diff options
author | Robert Newson <rnewson@apache.org> | 2011-05-26 19:00:29 +0000 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-05-26 19:00:29 +0000 |
commit | d5aa8379b531c664bbad0a364fc19729f1e30315 (patch) | |
tree | c5875644cc3dc22e9aac9b707702b2f2eaa623de /src/couchdb/couch_httpd_db.erl | |
parent | 7c719fe3b113f03e37aced91ab28957e2c4aeab3 (diff) |
COUCHDB-1177 - don't read more of an attachment than Content-Length states.
(original patch by Paul Davis, awesomeness enhanced by Robert Newson).
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1128040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 2930462b..f51fde09 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -1067,7 +1067,7 @@ db_attachment_req(#httpd{method=Method,mochi_req=MochiReq}=Req, Db, DocId, FileN end, - fun() -> couch_httpd:recv(Req, 0) end + fun(Size) -> couch_httpd:recv(Req, Size) end end, att_len = case couch_httpd:header_value(Req,"Content-Length") of undefined -> |