0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Parse Connection header tokens in a case-insensitive manner

This commit is contained in:
Loïc Hoguin 2011-10-20 19:04:49 +02:00
parent 381c178073
commit c589922ebd
3 changed files with 32 additions and 21 deletions

View file

@ -221,7 +221,7 @@ parse_header(Name, Req=#http_req{p_headers=PHeaders}, Default)
case header(Name, Req) of
{undefined, Req2} -> {tokens, Default, Req2};
{Value, Req2} ->
case cowboy_http:nonempty_list(Value, fun cowboy_http:token/2) of
case cowboy_http:nonempty_list(Value, fun cowboy_http:token_ci/2) of
{error, badarg} ->
{error, badarg};
P ->