summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2008-06-02 22:29:33 +0000
committerChristopher Lenz <cmlenz@apache.org>2008-06-02 22:29:33 +0000
commit3544891c723ddb79a3daa54ae3d50a42851447d1 (patch)
tree3bb16bc6e5de1eb12c3b5ad3724c3dad2589f10e
parentefd28ccaa331fc983749dd6322fb4f4303c2e3b7 (diff)
Increase the request body size limitations on bulk_docs and document POST to 4GB.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@662591 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_httpd.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index bc99e4d5..27bc385c 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -184,7 +184,7 @@ handle_db_request(Req, 'GET', {DbName, Db, []}) ->
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, _Method, {_DbName, _Db, []}) ->
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