mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-21 19:51:50 +00:00
Using case-insensitive string comparison for connection: keep-alive
This commit is contained in:
1 parent
63909b59c5
commit
e2b42e4117
1 file changed
+1
-1
+1
-1
@@ -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")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user