couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [38/49] chttpd commit: updated refs/heads/windsor-merge to 554ef74
Date Fri, 01 Aug 2014 09:06:14 GMT
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/windsor-merge
Commit: bcac53f776c52e29a5b8b4357f88ec585ef55e93
Parents: d6161e7
Author: Robert Newson <robert.newson@cloudant.com>
Authored: Wed Jan 8 18:05:57 2014 +0000
Committer: Robert Newson <rnewson@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


Mime
View raw message