From 3544891c723ddb79a3daa54ae3d50a42851447d1 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Mon, 2 Jun 2008 22:29:33 +0000 Subject: 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 --- src/couchdb/couch_httpd.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3