diff options
| author | grunfink <grunfink@noreply.codeberg.org> | 2024-09-16 07:28:28 +0000 |
|---|---|---|
| committer | grunfink <grunfink@noreply.codeberg.org> | 2024-09-16 07:28:28 +0000 |
| commit | a09e5052ddd8df423332ada814e743893878e0b9 (patch) | |
| tree | 732e4a923354f64614991c46fe264b7e0e78ef1e /xs_httpd.h | |
| parent | b3c00cc09871433882e97a9f5d07882dd1bcfec8 (diff) | |
| parent | ba5cbb6d828165a43826c6afdd71fa2edbdca302 (diff) | |
Merge pull request 'URL decode data after splitting the arguments' (#196) from ndagestad/snac2:mastodon_login into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/196
Diffstat (limited to 'xs_httpd.h')
| -rw-r--r-- | xs_httpd.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -36,7 +36,7 @@ xs_dict *xs_httpd_request(FILE *f, xs_str **payload, int *p_size) { /* split the path with its optional variables */ - xs *udp = xs_url_dec(xs_list_get(l2, 1)); + const xs_val *udp = xs_list_get(l2, 1); xs *pnv = xs_split_n(udp, "?", 1); /* store the path */ @@ -75,8 +75,7 @@ xs_dict *xs_httpd_request(FILE *f, xs_str **payload, int *p_size) v = xs_dict_get(req, "content-type"); if (*payload && v && strcmp(v, "application/x-www-form-urlencoded") == 0) { - xs *upl = xs_url_dec(*payload); - p_vars = xs_url_vars(upl); + p_vars = xs_url_vars(*payload); } else if (*payload && v && xs_startswith(v, "multipart/form-data")) { |