From e2b42e4117f94b4a23be02d3503a8f6d91031aa0 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 10 Jan 2014 22:43:52 +0000 Subject: [PATCH] Using case-insensitive string comparison for connection: keep-alive --- mongoose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 1c4d35fc..501a7bf7 100644 --- a/mongoose.c +++ b/mongoose.c @@ -460,7 +460,7 @@ static int should_keep_alive(const struct mg_connection *conn) { const char *http_version = conn->http_version; const char *header = mg_get_header(conn, "Connection"); return method != NULL && !strcmp(method, "GET") && - ((header != NULL && !strcmp(header, "keep-alive")) || + ((header != NULL && !mg_strcasecmp(header, "keep-alive")) || (header == NULL && http_version && !strcmp(http_version, "1.1"))); }