Skip to content

Commit

Permalink
Problem: formatting errors
Browse files Browse the repository at this point in the history
Solution: run make clang-format-diff
  • Loading branch information
bluca committed Feb 8, 2021
1 parent 8432cc3 commit 54c7f79
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ws_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,19 @@ 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){
else if (strcasecmp ("connection", _header_name) == 0) {
char *element = strtok (_header_value, ",");
while (element != NULL){
while (element != NULL) {
while (*element == ' ')
element++;
if (strcasecmp ("upgrade", element) == 0){
if (strcasecmp ("upgrade", element) == 0) {
_header_connection_upgrade = true;
break;
}
element = strtok (NULL, ",");
}
}
else if (strcasecmp ("Sec-WebSocket-Key", _header_name)
== 0)
} else if (strcasecmp ("Sec-WebSocket-Key", _header_name)
== 0)
strcpy_s (_websocket_key, _header_value);
else if (strcasecmp ("Sec-WebSocket-Protocol", _header_name)
== 0) {
Expand Down

0 comments on commit 54c7f79

Please sign in to comment.