0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00

Keep the whitespace from multiline headers

Before, we could have

Header: the value
 is multiline

Become "the valueis multiline".

Now it will properly be "the value is multiline".
This commit is contained in:
Loïc Hoguin 2014-02-27 13:13:35 +01:00
parent e7afe1f381
commit 64f07fe9a3

View file

@ -375,7 +375,8 @@ parse_hd_value(<< $\r, Rest/bits >>, S, M, P, Q, V, Headers, Name, SoFar) ->
<< $\n >> ->
wait_hd_value_nl(<<>>, S, M, P, Q, V, Headers, Name, SoFar);
<< $\n, C, Rest2/bits >> when C =:= $\s; C =:= $\t ->
parse_hd_value(Rest2, S, M, P, Q, V, Headers, Name, SoFar);
parse_hd_value(Rest2, S, M, P, Q, V, Headers, Name,
<< SoFar/binary, C >>);
<< $\n, Rest2/bits >> ->
parse_header(Rest2, S, M, P, Q, V, [{Name, SoFar}|Headers])
end;