From 0a9f37225f559042ffc83d5538f13908c438ab47 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 24 Oct 2017 06:44:26 +0800 Subject: [PATCH] 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. --- lib/client/client.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/client/client.c b/lib/client/client.c index b2a4c12f5..7cdc7e3d6 100644 --- a/lib/client/client.c +++ b/lib/client/client.c @@ -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;