Commit e2b42e41 authored by Sergey Lyubka's avatar Sergey Lyubka

Using case-insensitive string comparison for connection: keep-alive

parent 63909b59
...@@ -460,7 +460,7 @@ static int should_keep_alive(const struct mg_connection *conn) { ...@@ -460,7 +460,7 @@ static int should_keep_alive(const struct mg_connection *conn) {
const char *http_version = conn->http_version; const char *http_version = conn->http_version;
const char *header = mg_get_header(conn, "Connection"); const char *header = mg_get_header(conn, "Connection");
return method != NULL && !strcmp(method, "GET") && 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"))); (header == NULL && http_version && !strcmp(http_version, "1.1")));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment