Skip to content
Browse files

COUCHDB-822 - maximum size of external body should follow the same ru…

…les as documents themselves.

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1159300 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 2254c3e commit fbac8ab488e48c5c6e892aefe074723ff52842a2 @rnewson rnewson committed Aug 18, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/couchdb/couch_httpd_external.erl
View
5 src/couchdb/couch_httpd_external.erl
@@ -61,7 +61,10 @@ json_req_obj(#httpd{mochi_req=Req,
req_body=ReqBody
}, Db, DocId) ->
Body = case ReqBody of
- undefined -> Req:recv_body();
+ undefined ->
+ MaxSize = list_to_integer(
+ couch_config:get("couchdb", "max_document_size", "4294967296")),
+ Req:recv_body(MaxSize);
Else -> Else
end,
ParsedForm = case Req:get_primary_header_value("content-type") of

0 comments on commit fbac8ab

Please sign in to comment.
Something went wrong with that request. Please try again.