From 0d89f3cbed69a86251e6ed791c57e99a7f59c8d9 Mon Sep 17 00:00:00 2001 From: Ash 20001 Date: Tue, 20 Oct 2015 12:12:12 +0800 Subject: [PATCH] detect http1 close connection header properly --- lib/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server.c b/lib/server.c index fc491418..b4a67e49 100644 --- a/lib/server.c +++ b/lib/server.c @@ -272,7 +272,7 @@ int lws_http_action(struct libwebsocket_context *context, if (!strcasecmp(http_conn_str, "keep-alive")) connection_type = HTTP_CONNECTION_KEEP_ALIVE; else - if (strcasecmp(http_conn_str, "close")) + if (!strcasecmp(http_conn_str, "close")) connection_type = HTTP_CONNECTION_CLOSE; } wsi->u.http.connection_type = connection_type;