From 07d4cf7628d1fba2862d5a3e64d172fd3768a9d2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 22 Oct 2017 17:28:27 +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 b2a4c12f..7cdc7e3d 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;