diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d298ef9..745cef713 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c index 7cb44f15f..45eb63283 100644 --- a/lib/roles/http/client/client-http.c +++ b/lib/roles/http/client/client-http.c @@ -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, diff --git a/lib/roles/http/server/lws-spa.c b/lib/roles/http/server/lws-spa.c index 1bbf77a63..fdf146dee 100644 --- a/lib/roles/http/server/lws-spa.c +++ b/lib/roles/http/server/lws-spa.c @@ -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';