couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r1159300 - /couchdb/trunk/src/couchdb/couch_httpd_external.erl
Date Thu, 18 Aug 2011 16:25:09 GMT
Author: rnewson
Date: Thu Aug 18 16:25:08 2011
New Revision: 1159300

URL: http://svn.apache.org/viewvc?rev=1159300&view=rev
Log:
COUCHDB-822 - maximum size of external body should follow the same rules as documents themselves.

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_external.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_external.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_external.erl?rev=1159300&r1=1159299&r2=1159300&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_external.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_external.erl Thu Aug 18 16:25:08 2011
@@ -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



Mime
View raw message