You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/08/28 14:00:00 UTC

[37/50] chttpd commit: updated refs/heads/master to 58020ab

Honor max_document_size when receiving body in externals

BugzID: 26773


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/bcac53f7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/bcac53f7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/bcac53f7

Branch: refs/heads/master
Commit: bcac53f776c52e29a5b8b4357f88ec585ef55e93
Parents: d6161e7
Author: Robert Newson <ro...@cloudant.com>
Authored: Wed Jan 8 18:05:57 2014 +0000
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Jul 31 11:55:10 2014 +0100

----------------------------------------------------------------------
 src/chttpd_external.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/bcac53f7/src/chttpd_external.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_external.erl b/src/chttpd_external.erl
index e8ea919..cfd13b2 100644
--- a/src/chttpd_external.erl
+++ b/src/chttpd_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(
+                config:get("couchdb", "max_document_size", "4294967296")),
+            Req:recv_body(MaxSize);
         Else -> Else
     end,
     ParsedForm = case Req:get_primary_header_value("content-type") of