mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
ejabberd_websocket: Ignore case of header values
RFC 6455 says that the client's opening handshake includes an Upgrade header field "containing the value 'websocket', treated as an ASCII case-insensitive value." Closes #510.
This commit is contained in:
parent
7d3b2cad26
commit
0cd77ab942
@ -73,9 +73,10 @@ check(_Path, Headers) ->
|
||||
{_, HVal} ->
|
||||
case Val of
|
||||
ignore -> false; % ignore value -> ok, remove from list
|
||||
HVal -> false; % expected val -> ok, remove from list
|
||||
_ ->
|
||||
true % val is different, keep in list
|
||||
% expected value -> ok, remove from list (false)
|
||||
% value is different, keep in list (true)
|
||||
str:to_lower(HVal) /= Val
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user