snac2

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

commit 9283bc3bc0de2a71a16352b273a77c7b9af4468b
parent 33375aca905339f759207d11d19f0ef102941f5d
Author: default <nobody@localhost>
Date:   Mon, 11 Nov 2024 19:41:43 +0100

Fixed crash in xs_multipart_form_data() (from the tooot application).

Diffstat:
Mxs_url.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xs_url.h b/xs_url.h @@ -153,7 +153,7 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea memcpy(s1, p, q - p); s1[q - p] = '\0'; - if (xs_startswith(s1, "Content-Disposition")) { + if (xs_startswith(s1, "Content-Disposition") || xs_startswith(s1, "content-disposition")) { /* split by " like a primitive man */ l1 = xs_split(s1, "\""); @@ -167,7 +167,7 @@ xs_dict *xs_multipart_form_data(const char *payload, int p_size, const char *hea } } else - if (xs_startswith(s1, "Content-Type")) { + if (xs_startswith(s1, "Content-Type") || xs_startswith(s1, "content-type")) { l1 = xs_split(s1, ":"); if (xs_list_len(l1) >= 2) {