snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 11a89ef0f9c8c4e7d1323fc16900755d7d729395
parent d55db283902ba81c91ae7842c53d81bd0d7dd6f6
Author: default <nobody@localhost>
Date:   Thu, 20 Apr 2023 12:46:59 +0200

Backport from xs.

Diffstat:
Mxs_httpd.h | 4++--
Mxs_version.h | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xs_httpd.h b/xs_httpd.h @@ -236,12 +236,12 @@ xs_dict *xs_httpd_request(FILE *f, xs_str **payload, int *p_size) v = xs_dict_get(req, "content-type"); - if (v && strcmp(v, "application/x-www-form-urlencoded") == 0) { + if (*payload && v && strcmp(v, "application/x-www-form-urlencoded") == 0) { xs *upl = xs_url_dec(*payload); p_vars = xs_url_vars(upl); } else - if (v && xs_startswith(v, "multipart/form-data")) { + if (*payload && v && xs_startswith(v, "multipart/form-data")) { p_vars = _xs_multipart_form_data(*payload, *p_size, v); } else diff --git a/xs_version.h b/xs_version.h @@ -1 +1 @@ -/* ff134685f4cb4096c6fce0a2a946be2663ff196e */ +/* a885c7cc4c8e6384ae23125ed05f434471ccc6fb */