diff options
author | Loïc Hoguin <[email protected]> | 2013-09-02 18:45:02 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-09-02 18:45:02 +0200 |
commit | b086ccfb7594e61c7a85241745b5329999053449 (patch) | |
tree | 8e9965944b0122c38c603c83279fa6d07a7d28d7 /src/cow_spdy.erl | |
parent | fad5c0049df278cc498b6cdb519b09e845a070a8 (diff) | |
download | cowlib-b086ccfb7594e61c7a85241745b5329999053449.tar.gz cowlib-b086ccfb7594e61c7a85241745b5329999053449.tar.bz2 cowlib-b086ccfb7594e61c7a85241745b5329999053449.zip |
Replace previous special header if there's any duplicate
Diffstat (limited to 'src/cow_spdy.erl')
-rw-r--r-- | src/cow_spdy.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cow_spdy.erl b/src/cow_spdy.erl index 4856afd..2dc1027 100644 --- a/src/cow_spdy.erl +++ b/src/cow_spdy.erl @@ -168,7 +168,8 @@ parse_headers(<< L1:32, Key:L1/binary, L2:32, Value:L2/binary, Rest/bits >>, NbHeaders, Acc, SpAcc) -> case Key of << $:, _/bits >> -> - parse_headers(Rest, NbHeaders - 1, Acc, [{Key, Value}|SpAcc]); + parse_headers(Rest, NbHeaders - 1, Acc, + [{Key, Value}|lists:keydelete(Key, 1, SpAcc)]); _ -> parse_headers(Rest, NbHeaders - 1, [{Key, Value}|Acc], SpAcc) end. |