mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Fix multipart parsing
Close cesanta/mongoose#770 PUBLISHED_FROM=ae55988f1c6ccdff172b8db405adb36c91289d95
This commit is contained in:
1 parent
bf505bb68d
commit
54989e819a
1 file changed
+2
-7
+2
-7
@@ -5635,11 +5635,6 @@ static void mg_http_multipart_begin(struct mg_connection *nc,
|
|||||||
char boundary[100];
|
char boundary[100];
|
||||||
int boundary_len;
|
int boundary_len;
|
||||||
|
|
||||||
if (nc->listener == NULL) {
|
|
||||||
/* No streaming for replies now */
|
|
||||||
goto exit_mp;
|
|
||||||
}
|
|
||||||
|
|
||||||
ct = mg_get_http_header(hm, "Content-Type");
|
ct = mg_get_http_header(hm, "Content-Type");
|
||||||
if (ct == NULL) {
|
if (ct == NULL) {
|
||||||
/* We need more data - or it isn't multipart mesage */
|
/* We need more data - or it isn't multipart mesage */
|
||||||
@@ -6369,8 +6364,8 @@ int mg_http_parse_header(struct mg_str *hdr, const char *var_name, char *buf,
|
|||||||
|
|
||||||
/* Find where variable starts */
|
/* Find where variable starts */
|
||||||
for (s = hdr->p; s != NULL && s + n < end; s++) {
|
for (s = hdr->p; s != NULL && s + n < end; s++) {
|
||||||
if ((s == hdr->p || s[-1] == ch || s[-1] == ch1) && s[n] == '=' &&
|
if ((s == hdr->p || s[-1] == ch || s[-1] == ch1 || s[-1] == ';') &&
|
||||||
!strncmp(s, var_name, n))
|
s[n] == '=' && !strncmp(s, var_name, n))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user