Add max_document_size checking for multipart PUT requests 201/head
authorNick Vatamaniuc <vatamane@apache.org>
Tue, 4 Oct 2016 06:50:07 +0000 (02:50 -0400)
committerNick Vatamaniuc <vatamane@apache.org>
Tue, 4 Oct 2016 06:50:07 +0000 (02:50 -0400)
commit7dec013e8dc12db718ce124ad07f62b7cd3f7419
tree9c4d56aeb5a921880e3d3fe4cedd05ea639d6438
parentf129308c44f761db1c82530e37b8656b563b3a03
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.

Jira: COUCHDB-3174
src/couch_httpd.erl
src/couch_httpd_db.erl