Skip to content

Commit

Permalink
Removed the HTTP/1.0 + "Connection: close" exception for inferring a …
Browse files Browse the repository at this point in the history
…request body.

This was causing non-conformant behavior infavor of broken clients. See issue #147.
  • Loading branch information
s-ludwig committed Jan 8, 2013
1 parent d35ef57 commit 68951aa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions source/vibe/http/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -1068,11 +1068,7 @@ private bool handleRequest(Stream conn, string peer_address, HTTPServerListener
chunked_input_stream = FreeListRef!ChunkedInputStream(reqReader);
limited_http_input_stream = FreeListRef!LimitedHttpInputStream(chunked_input_stream, settings.maxRequestSize, true);
} else {
auto pc = "Connection" in req.headers;
if( pc && *pc == "close" && req.httpVersion == HttpVersion.HTTP_1_0 )
limited_http_input_stream = FreeListRef!LimitedHttpInputStream(reqReader, settings.maxRequestSize, true);
else
limited_http_input_stream = FreeListRef!LimitedHttpInputStream(reqReader, 0);
limited_http_input_stream = FreeListRef!LimitedHttpInputStream(reqReader, 0);
}
req.bodyReader = limited_http_input_stream;

Expand Down

0 comments on commit 68951aa

Please sign in to comment.