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

Close connection if LWS_CALLBACK_HTTP returns non-zero.

This commit is contained in:
David Galeano 2013-01-10 10:37:29 +08:00 committed by Andy Green
parent 7ffbe1bfca
commit 651544312c

View file

@ -586,10 +586,11 @@ libwebsocket_read(struct libwebsocket_context *context,
!wsi->utf8_token[WSI_TOKEN_CONNECTION].token_len) {
wsi->state = WSI_STATE_HTTP;
if (wsi->protocol->callback)
(wsi->protocol->callback)(context, wsi,
LWS_CALLBACK_HTTP, wsi->user_space,
wsi->utf8_token[WSI_TOKEN_GET_URI].token,
wsi->utf8_token[WSI_TOKEN_GET_URI].token_len);
if (wsi->protocol->callback(context, wsi,
LWS_CALLBACK_HTTP, wsi->user_space,
wsi->utf8_token[WSI_TOKEN_GET_URI].token,
wsi->utf8_token[WSI_TOKEN_GET_URI].token_len))
goto bail;
return 0;
}