summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-09-15 13:04:10 +0000
committerJan Lehnardt <jan@apache.org>2009-09-15 13:04:10 +0000
commitfc201b8869eb22cd1ef39d11bf945283c439059c (patch)
tree8a7f1429f9e21f80617ba231e8cc12e4d5338c86 /src
parentf96fee2d02a222395909810b3741400f2c9652be (diff)
fix attachments with an undefined Content-Length header and no TE, patch by Benoit Chesneau, closes COUCHDB-497
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@815308 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd_db.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index dab583e3..2ff02654 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -895,7 +895,7 @@ db_attachment_req(#httpd{method=Method}=Req, Db, DocId, FileNameParts)
end,
data = case couch_httpd:body_length(Req) of
undefined ->
- undefined;
+ <<"">>;
{unknown_transfer_encoding, Unknown} ->
exit({unknown_transfer_encoding, Unknown});
chunked ->
@@ -904,7 +904,7 @@ db_attachment_req(#httpd{method=Method}=Req, Db, DocId, FileNameParts)
ChunkFun, InitState)
end;
0 ->
- <<>>;
+ <<"">>;
Length when is_integer(Length) ->
fun() -> couch_httpd:recv(Req, 0) end;
Length ->