mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Merge pull request #4132 from sab24/master
Fixes Firefox WebSocket upgrade request in WebSocket engine
This commit is contained in:
commit
b3722cf983
14
RELICENSE/sab24.md
Normal file
14
RELICENSE/sab24.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
|
||||
|
||||
This is a statement by Bart Smink
|
||||
that grants permission to relicense its copyrights in the libzmq C++
|
||||
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
|
||||
Open Source Initiative approved license chosen by the current
|
||||
ZeroMQ BDFL (Benevolent Dictator for Life).
|
||||
|
||||
A portion of the commits made by the Github handle "sab24", with
|
||||
commit author "sab24 <sab24@github.com>", are copyright of Bart Smink.
|
||||
This document hereby grants the libzmq project team to relicense libzmq,
|
||||
including all past, present and future contributions of the author listed above.
|
||||
|
||||
Bart Smink 2021/01/30
|
@ -453,9 +453,18 @@ bool zmq::ws_engine_t::server_handshake ()
|
||||
if (strcasecmp ("upgrade", _header_name) == 0)
|
||||
_header_upgrade_websocket =
|
||||
strcasecmp ("websocket", _header_value) == 0;
|
||||
else if (strcasecmp ("connection", _header_name) == 0)
|
||||
_header_connection_upgrade =
|
||||
strcasecmp ("upgrade", _header_value) == 0;
|
||||
else if (strcasecmp ("connection", _header_name) == 0){
|
||||
char *element = strtok (_header_value, ",");
|
||||
while (element != NULL){
|
||||
while (*element == ' ')
|
||||
element++;
|
||||
if (strcasecmp ("upgrade", element) == 0){
|
||||
_header_connection_upgrade = true;
|
||||
break;
|
||||
}
|
||||
element = strtok (NULL, ",");
|
||||
}
|
||||
}
|
||||
else if (strcasecmp ("Sec-WebSocket-Key", _header_name)
|
||||
== 0)
|
||||
strcpy_s (_websocket_key, _header_value);
|
||||
|
Loading…
Reference in New Issue
Block a user