Skip to content

Commit

Permalink
force failed header parse to act
Browse files Browse the repository at this point in the history
''...Websocket servers return failure responses other than HTTP Status 101 in the case of
mismatches of WebSocket version or additional header data etc...
It seems that libwebsockets shows "WARN: problems parsing header" error in such cases without
calling any callbacks or returning error code. Is this right?
I modified lib/client.c to handle this.''

Signed-off-by: Fujii Bunichiroh <[email protected]>
  • Loading branch information
Fujii Bunichiroh authored and Andy Green committed Sep 18, 2013
1 parent 8eda411 commit e929476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ int lws_client_socket_service(struct libwebsocket_context *context,
"closing connection at LWS_CONNMODE...SERVER_REPLY\n");
libwebsocket_close_and_free_session(context, wsi,
LWS_CLOSE_STATUS_NOSTATUS);
return 0;
return -1;

case LWS_CONNMODE_WS_CLIENT_WAITING_EXTENSION_CONNECT:
lwsl_ext("LWS_CONNMODE_WS_CLIENT_WAITING_EXTENSION_CONNECT\n");
Expand Down

0 comments on commit e929476

Please sign in to comment.