diff options
author | Loïc Hoguin <[email protected]> | 2014-02-27 13:13:35 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-02-27 13:13:35 +0100 |
commit | 64f07fe9a345da95a852c720e3c07569ecc6a59d (patch) | |
tree | b63eeabf4df9ffe2f6879ab268c1b043dd48f073 /src | |
parent | e7afe1f381f93f0c4df3680ff55dae111e864c9f (diff) | |
download | cowboy-64f07fe9a345da95a852c720e3c07569ecc6a59d.tar.gz cowboy-64f07fe9a345da95a852c720e3c07569ecc6a59d.tar.bz2 cowboy-64f07fe9a345da95a852c720e3c07569ecc6a59d.zip |
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".
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_protocol.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl index ec05eb3..78c641d 100644 --- a/src/cowboy_protocol.erl +++ b/src/cowboy_protocol.erl @@ -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; |