1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

revert 187

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-12-01 19:28:28 +08:00
parent d01de66951
commit 62fe015455
3 changed files with 7 additions and 6 deletions

View file

@ -568,12 +568,12 @@ lws_client_interpret_server_handshake(struct libwebsocket_context *context,
}
while (*pc && *pc != ',')
pc++;
while (*pc && *pc == ' ')
while (*pc && *pc != ' ')
pc++;
}
if (!okay) {
lwsl_err("lws_client_int_s_hs: got bad protocol '%s'\n", p);
lwsl_err("lws_client_int_s_hs: got bad protocol %s\n", p);
goto bail2;
}
@ -591,7 +591,7 @@ lws_client_interpret_server_handshake(struct libwebsocket_context *context,
}
if (wsi->protocol == NULL) {
lwsl_err("lws_client_int_s_hs: fail protocol '%s'\n", p);
lwsl_err("lws_client_int_s_hs: fail protocol %s\n", p);
goto bail2;
}

View file

@ -217,7 +217,10 @@ handshake_0405(struct libwebsocket_context *context, struct libwebsocket *wsi)
if (lws_hdr_total_length(wsi, WSI_TOKEN_PROTOCOL)) {
LWS_CPYAPP(p, "\x0d\x0aSec-WebSocket-Protocol: ");
LWS_CPYAPP(p, wsi->protocol->name);
n = lws_hdr_copy(wsi, p, 128, WSI_TOKEN_PROTOCOL);
if (n < 0)
goto bail;
p += n;
}
#ifndef LWS_NO_EXTENSIONS

View file

@ -467,8 +467,6 @@ upgrade_ws:
protocol_name[n] = '\0';
if (*p)
p++;
while (*p == ' ')
p++;
lwsl_info("checking %s\n", protocol_name);