commit 11a89ef
default
·
2023-04-20 10:46:59 +0000 UTC
parent d55db28
Backport from xs.
2 files changed,
+3,
-3
+2,
-2
1@@ -236,12 +236,12 @@ xs_dict *xs_httpd_request(FILE *f, xs_str **payload, int *p_size)
2
3 v = xs_dict_get(req, "content-type");
4
5- if (v && strcmp(v, "application/x-www-form-urlencoded") == 0) {
6+ if (*payload && v && strcmp(v, "application/x-www-form-urlencoded") == 0) {
7 xs *upl = xs_url_dec(*payload);
8 p_vars = xs_url_vars(upl);
9 }
10 else
11- if (v && xs_startswith(v, "multipart/form-data")) {
12+ if (*payload && v && xs_startswith(v, "multipart/form-data")) {
13 p_vars = _xs_multipart_form_data(*payload, *p_size, v);
14 }
15 else
+1,
-1
1@@ -1 +1 @@
2-/* ff134685f4cb4096c6fce0a2a946be2663ff196e */
3+/* a885c7cc4c8e6384ae23125ed05f434471ccc6fb */