mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
Drop R15 support
This commit is contained in:
parent
de4697690c
commit
e2b5c21443
7 changed files with 11 additions and 17 deletions
|
@ -276,7 +276,7 @@ host_url(Req=#http_req{transport=Transport, host=Host, port=Port}) ->
|
|||
PortBin = case {TransportName, Port} of
|
||||
{ssl, 443} -> <<>>;
|
||||
{tcp, 80} -> <<>>;
|
||||
_ -> << ":", (list_to_binary(integer_to_list(Port)))/binary >>
|
||||
_ -> << ":", (integer_to_binary(Port))/binary >>
|
||||
end,
|
||||
{<< "http", Secure/binary, "://", Host/binary, PortBin/binary >>, Req}.
|
||||
|
||||
|
@ -634,7 +634,7 @@ body_decode(Req=#http_req{buffer=Data, body_state={stream, _,
|
|||
body_decode_end(Req=#http_req{headers=Headers, p_headers=PHeaders},
|
||||
TotalLength, Rest) ->
|
||||
Headers2 = lists:keystore(<<"content-length">>, 1, Headers,
|
||||
{<<"content-length">>, list_to_binary(integer_to_list(TotalLength))}),
|
||||
{<<"content-length">>, integer_to_binary(TotalLength)}),
|
||||
%% At this point we just assume TEs were all decoded.
|
||||
Headers3 = lists:keydelete(<<"transfer-encoding">>, 1, Headers2),
|
||||
PHeaders2 = lists:keystore(<<"content-length">>, 1, PHeaders,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue