Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DISCUSS] Validate new document writes against max_http_request_size #1253

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
remove debug log
  • Loading branch information
janl committed Jul 13, 2018
commit 797c6d7b2fa00d2d4a196c39cfe27798aaf95560
1 change: 0 additions & 1 deletion src/couch/src/couch_doc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ from_json_obj_validate(EJson, DbName) ->
% sum up the json body size + attachment body size and
% make sure it is < max_http_request_size
validate_total_document_size(#doc{id=DocId, body=Body, atts=Atts0}=Doc) ->
couch_log:debug("~nData: ~p~n", [Doc]),
MaxReqSize = config:get_integer("httpd", "max_http_request_size", 4294967296), % 4 GB
Boundary = <<"d07e231b4fc27759fd822449377fcba7">>,
Atts = lists:map(fun couch_att:to_tuple/1, Atts0),
Expand Down