diff options
author | Loïc Hoguin <[email protected]> | 2012-03-13 03:00:05 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-03-13 03:00:05 +0100 |
commit | 36a6823e50e36c201df6c7a88a4c77cdaac7f2e6 (patch) | |
tree | bd8f0c48615616f7146d94496bb466d0e917f638 /src/cowboy_http_protocol.erl | |
parent | e87f51e542a9ee5bdcadd5841731b32210732e08 (diff) | |
download | cowboy-36a6823e50e36c201df6c7a88a4c77cdaac7f2e6.tar.gz cowboy-36a6823e50e36c201df6c7a88a4c77cdaac7f2e6.tar.bz2 cowboy-36a6823e50e36c201df6c7a88a4c77cdaac7f2e6.zip |
Do not send chunked Transfer-Encoding replies for HTTP/1.0
Fixes compatibility issue #140 reported by @majek.
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r-- | src/cowboy_http_protocol.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index 71518fa..2d58315 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -402,6 +402,8 @@ ensure_response(Req=#http_req{resp_state=waiting}) -> %% Close the chunked reply. ensure_response(#http_req{method='HEAD', resp_state=chunks}) -> close; +ensure_response(#http_req{version={1, 0}, resp_state=chunks}) -> + close; ensure_response(#http_req{socket=Socket, transport=Transport, resp_state=chunks}) -> Transport:send(Socket, <<"0\r\n\r\n">>), |