couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r703275 - /incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl
Date Thu, 09 Oct 2008 22:02:05 GMT
Author: jchris
Date: Thu Oct  9 15:02:05 2008
New Revision: 703275

URL: http://svn.apache.org/viewvc?rev=703275&view=rev
Log:
remove content-length header from file attachment responses. see inline comments

Modified:
    incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl

Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=703275&r1=703274&r2=703275&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_httpd_db.erl Thu Oct  9 15:02:05 2008
@@ -504,8 +504,13 @@
         {Type, Bin} ->
             {ok, Resp} = start_chunked_response(Req, 200, [
                 {"Cache-Control", "must-revalidate"},
-                {"Content-Type", binary_to_list(Type)},
-                {"Content-Length", integer_to_list(couch_doc:bin_size(Bin))}]),
+                {"Content-Type", binary_to_list(Type)}%,
+                % My understanding of http://www.faqs.org/rfcs/rfc2616.html
+                % says that we should not use Content-Length with a chunked
+                % encoding. Turning this off makes libcurl happy, but I am
+                % open to discussion.
+                % {"Content-Length", integer_to_list(couch_doc:bin_size(Bin))}
+                ]),
             couch_doc:bin_foldl(Bin,
                 fun(BinSegment, []) ->
                     send_chunk(Resp, BinSegment),



Mime
View raw message