You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by cm...@apache.org on 2008/06/03 00:29:34 UTC

svn commit: r662591 - /incubator/couchdb/trunk/src/couchdb/couch_httpd.erl

Author: cmlenz
Date: Mon Jun  2 15:29:33 2008
New Revision: 662591

URL: http://svn.apache.org/viewvc?rev=662591&view=rev
Log:
Increase the request body size limitations on bulk_docs and document POST to 4GB.

Modified:
    incubator/couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=662591&r1=662590&r2=662591&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Mon Jun  2 15:29:33 2008
@@ -184,7 +184,7 @@
 
 handle_db_request(Req, 'POST', {_DbName, Db, []}) ->
     % TODO: Etag handling
-    Json = cjson:decode(Req:recv_body()),
+    Json = cjson:decode(Req:recv_body(?MAX_DOC_SIZE)),
     Doc = couch_doc:from_json_obj(Json),
     DocId = couch_util:new_uuid(),
     {ok, NewRev} = couch_db:update_doc(Db, Doc#doc{id=DocId, revs=[]}, []),
@@ -199,7 +199,7 @@
 
 handle_db_request(Req, 'POST', {_DbName, Db, ["_bulk_docs"]}) ->
     Options = [], % put options here.
-    {obj, JsonProps} = cjson:decode(Req:recv_body()),
+    {obj, JsonProps} = cjson:decode(Req:recv_body(?MAX_DOC_SIZE)),
     DocsArray = proplists:get_value("docs", JsonProps),
     % convert all the doc elements to native docs
     case proplists:get_value("new_edits", JsonProps, true) of