mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Accept absolute URI scheme as uppercase
We should be doing a case insensitive comparison to be correct, but this is more expensive. Almost all clients send lowercase, this patch fixes handling of the aws/aws-sdk-php client which sends uppercase, and no known client sends mixed case so I am holding back on the more expensive solution for the moment.
This commit is contained in:
parent
a2fabcdecf
commit
3625d6a2e2
1 changed files with 4 additions and 0 deletions
|
@ -180,6 +180,10 @@ parse_uri(<< "http://", Rest/bits >>, State, Method) ->
|
||||||
parse_uri_skip_host(Rest, State, Method);
|
parse_uri_skip_host(Rest, State, Method);
|
||||||
parse_uri(<< "https://", Rest/bits >>, State, Method) ->
|
parse_uri(<< "https://", Rest/bits >>, State, Method) ->
|
||||||
parse_uri_skip_host(Rest, State, Method);
|
parse_uri_skip_host(Rest, State, Method);
|
||||||
|
parse_uri(<< "HTTP://", Rest/bits >>, State, Method) ->
|
||||||
|
parse_uri_skip_host(Rest, State, Method);
|
||||||
|
parse_uri(<< "HTTPS://", Rest/bits >>, State, Method) ->
|
||||||
|
parse_uri_skip_host(Rest, State, Method);
|
||||||
parse_uri(Buffer, State, Method) ->
|
parse_uri(Buffer, State, Method) ->
|
||||||
parse_uri_path(Buffer, State, Method, <<>>).
|
parse_uri_path(Buffer, State, Method, <<>>).
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue