mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
multipart: quote boundary
https://github.com/warmcat/libwebsockets/issues/1948
This commit is contained in:
parent
15ce46d971
commit
4948291b8b
2 changed files with 4 additions and 2 deletions
|
@ -1027,7 +1027,7 @@ lws_http_multipart_headers(struct lws *wsi, uint8_t *p)
|
|||
wsi->http.multipart_boundary,
|
||||
sizeof(wsi->http.multipart_boundary));
|
||||
|
||||
n = lws_snprintf(arg, sizeof(arg), "multipart/form-data; boundary=%s",
|
||||
n = lws_snprintf(arg, sizeof(arg), "multipart/form-data; boundary=\"%s\"",
|
||||
wsi->http.multipart_boundary);
|
||||
|
||||
if (lws_add_http_header_by_token(wsi, WSI_TOKEN_HTTP_CONTENT_TYPE,
|
||||
|
|
|
@ -138,8 +138,10 @@ lws_urldecode_s_create(struct lws_spa *spa, struct lws *wsi, char *out,
|
|||
s->mime_boundary[m++] = '\x0a';
|
||||
s->mime_boundary[m++] = '-';
|
||||
s->mime_boundary[m++] = '-';
|
||||
if (*p == '\"')
|
||||
p++;
|
||||
while (m < (int)sizeof(s->mime_boundary) - 1 &&
|
||||
*p && *p != ' ' && *p != ';')
|
||||
*p && *p != ' ' && *p != ';' && *p != '\"')
|
||||
s->mime_boundary[m++] = *p++;
|
||||
s->mime_boundary[m] = '\0';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue