client: allow 201
authorAndy Green <andy@warmcat.com>
Sat, 8 Apr 2017 23:56:41 +0000 (07:56 +0800)
committerAndy Green <andy@warmcat.com>
Sat, 8 Apr 2017 23:56:41 +0000 (07:56 +0800)
lib/client.c

index c337b117fe96f89ab1cd89ec10975a49d7f96e5a..90fe227622b0efbf55780931fff85144cb4171aa 100755 (executable)
@@ -554,9 +554,9 @@ lws_client_interpret_server_handshake(struct lws *wsi)
        }
 
        if (!wsi->do_ws) {
-               if (n != 200 && n != 304) {
+               if (n != 200 && n != 201 && n != 304 && n != 401) {
                        lwsl_notice("Connection failed with code %d\n", n);
-                       cce = "HS: Server did not return 200 or 304";
+                       cce = "HS: Server unrecognized response code";
                        goto bail2;
                }