mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
Fix #1540 - case sensitive match in mg_is_chunked()
This commit is contained in:
1 parent
2b9f0480a1
commit
27c892806b
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -1804,9 +1804,9 @@ static void walkchunks(struct mg_connection *c, struct mg_http_message *hm,
|
||||
}
|
||||
|
||||
static bool mg_is_chunked(struct mg_http_message *hm) {
|
||||
struct mg_str needle = mg_str_n("chunked", 7);
|
||||
const char *needle = "chunked";
|
||||
struct mg_str *te = mg_http_get_header(hm, "Transfer-Encoding");
|
||||
return te != NULL && mg_strstr(*te, needle) != NULL;
|
||||
return te != NULL && mg_vcasecmp(te, needle) == 0;
|
||||
}
|
||||
|
||||
void mg_http_delete_chunk(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
|
||||
+2
-2
@@ -810,9 +810,9 @@ static void walkchunks(struct mg_connection *c, struct mg_http_message *hm,
|
||||
}
|
||||
|
||||
static bool mg_is_chunked(struct mg_http_message *hm) {
|
||||
struct mg_str needle = mg_str_n("chunked", 7);
|
||||
const char *needle = "chunked";
|
||||
struct mg_str *te = mg_http_get_header(hm, "Transfer-Encoding");
|
||||
return te != NULL && mg_strstr(*te, needle) != NULL;
|
||||
return te != NULL && mg_vcasecmp(te, needle) == 0;
|
||||
}
|
||||
|
||||
void mg_http_delete_chunk(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
|
||||
Reference in new issue
Block a user