diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 07a5eba3169..8699320b16c 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),