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
7840d455bb
commit
9b24e29b9a
3 changed files with 5 additions and 3 deletions
|
@ -327,7 +327,7 @@ set(PACKAGE "libwebsockets")
|
|||
set(CPACK_PACKAGE_NAME "${PACKAGE}")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "4")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "15")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "16")
|
||||
set(CPACK_PACKAGE_RELEASE 1)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
|
|
|
@ -989,7 +989,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