couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r747566 - /couchdb/vendor/mochiweb/current/src/mochiweb_request.erl
Date Tue, 24 Feb 2009 22:01:56 GMT
Author: cmlenz
Date: Tue Feb 24 22:01:55 2009
New Revision: 747566

URL: http://svn.apache.org/viewvc?rev=747566&view=rev
Log:
Updated MochiWeb vendor branch to r97 from <http://mochiweb.googlecode.com/svn/trunk/>.

Modified:
    couchdb/vendor/mochiweb/current/src/mochiweb_request.erl

Modified: couchdb/vendor/mochiweb/current/src/mochiweb_request.erl
URL: http://svn.apache.org/viewvc/couchdb/vendor/mochiweb/current/src/mochiweb_request.erl?rev=747566&r1=747565&r2=747566&view=diff
==============================================================================
--- couchdb/vendor/mochiweb/current/src/mochiweb_request.erl (original)
+++ couchdb/vendor/mochiweb/current/src/mochiweb_request.erl Tue Feb 24 22:01:55 2009
@@ -246,18 +246,12 @@
 
 %% @spec start_response_length({integer(), ioheaders(), integer()}) -> response()
 %% @doc Start the HTTP response by sending the Code HTTP response and
-%%      ResponseHeaders including a Content-Length of Length if appropriate.
-%%      The server will set header defaults such as Server
+%%      ResponseHeaders including a Content-Length of Length. The server
+%%      will set header defaults such as Server
 %%      and Date if not present in ResponseHeaders.
 start_response_length({Code, ResponseHeaders, Length}) ->
     HResponse = mochiweb_headers:make(ResponseHeaders),
-    HResponse1 = case (Length =/= 0 orelse (Code >= 200 andalso Code < 300)) of
-                     true ->
-                         mochiweb_headers:enter("Content-Length", Length,
-                                                HResponse);
-                     false ->
-                         HResponse
-                 end,
+    HResponse1 = mochiweb_headers:enter("Content-Length", Length, HResponse),
     start_response({Code, HResponse1}).
 
 %% @spec respond({integer(), ioheaders(), iodata() | chunked | {file, IoDevice}}) -> response()



Mime
View raw message