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

client: do not treat selected response codes as connection failures

There was not really any "connection failure" with some of these like 404.

They may have body content that is important.

The client should use lws_http_client_http_response(wsi) to discover
the response code the client action received and decide for itself
what to do about that.
This commit is contained in:
Andy Green 2017-10-22 17:28:27 +08:00
parent 10828b1ea0
commit 07d4cf7628

View file

@ -656,11 +656,6 @@ lws_client_interpret_server_handshake(struct lws *wsi)
}
if (!wsi->do_ws) {
if (n != 200 && n != 201 && n != 304 && n != 401) {
lwsl_notice("Connection failed with code %d\n", n);
cce = "HS: Server unrecognized response code";
goto bail2;
}
#ifdef LWS_WITH_HTTP_PROXY
wsi->perform_rewrite = 0;