mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-28 05:39:00 +08:00
should_keep_alive(): using mg_strcasecmp() instead of strcmp() to compare header value
This commit is contained in:
parent
6240455779
commit
7034f49276
@ -731,7 +731,7 @@ static int should_keep_alive(const struct mg_connection *conn) {
|
||||
const char *http_version = conn->request_info.http_version;
|
||||
const char *header = mg_get_header(conn, "Connection");
|
||||
return (header == NULL && http_version && !strcmp(http_version, "1.1")) ||
|
||||
(header != NULL && !strcmp(header, "keep-alive"));
|
||||
(header != NULL && !mg_strcasecmp(header, "keep-alive"));
|
||||
}
|
||||
|
||||
static const char *suggest_connection_header(const struct mg_connection *conn) {
|
||||
|
Loading…
Reference in New Issue
Block a user