You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2016/10/06 21:27:03 UTC
[1/2] chttpd commit: updated refs/heads/master to 4e9b4a6
Repository: couchdb-chttpd
Updated Branches:
refs/heads/master d2c449b7b -> 4e9b4a64c
Add max_document_size checking for multipart PUT requests
Previously multipart/related PUT requests didn't check maximum request sizes.
This commit checks content-length and compares that with the maximum.
This means keeping the current "semantics" of max_document_size which actually
means "max request size". But this makes the check more efficient and can
be done earlier in request processing time.
PR depends on https://github.com/apache/couchdb-couch/pull/201 make sure to
merge that one first if accepted.
Jira: COUCHDB-3174
Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/5d7170c4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/5d7170c4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/5d7170c4
Branch: refs/heads/master
Commit: 5d7170c472d2ca72d4a0dd41eb7ae4434266be7d
Parents: 297493f
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Tue Oct 4 02:58:32 2016 -0400
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Tue Oct 4 02:58:32 2016 -0400
----------------------------------------------------------------------
src/chttpd_db.erl | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/5d7170c4/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 07a5eba..8699320 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -761,6 +761,7 @@ db_doc_req(#httpd{method='PUT', user_ctx=Ctx}=Req, Db, DocId) ->
RespHeaders = [{"Location", Loc}],
case couch_util:to_list(couch_httpd:header_value(Req, "Content-Type")) of
("multipart/related;" ++ _) = ContentType ->
+ couch_httpd:check_max_request_length(Req),
couch_httpd_multipart:num_mp_writers(mem3:n(mem3:dbname(Db#db.name), DocId)),
{ok, Doc0, WaitFun, Parser} = couch_doc:doc_from_multi_part_stream(ContentType,
fun() -> receive_request_data(Req) end),
[2/2] chttpd commit: updated refs/heads/master to 4e9b4a6
Posted by va...@apache.org.
Merge branch 'couchdb-3174'
Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/4e9b4a64
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/4e9b4a64
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/4e9b4a64
Branch: refs/heads/master
Commit: 4e9b4a64ca7c638c29422602bc78a4e7be177fb3
Parents: d2c449b 5d7170c
Author: Nick Vatamaniuc <va...@apache.org>
Authored: Thu Oct 6 17:26:39 2016 -0400
Committer: Nick Vatamaniuc <va...@apache.org>
Committed: Thu Oct 6 17:26:39 2016 -0400
----------------------------------------------------------------------
src/chttpd_db.erl | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/4e9b4a64/src/chttpd_db.erl
----------------------------------------------------------------------