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()