aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/main.c b/main.c
index c7481d0..4a9dfa5 100644
--- a/main.c
+++ b/main.c
@@ -150,10 +150,11 @@ static int append_form(struct form **const forms, const char **const s,
*forms = fs;
f = &(*forms)[(*n)++];
+ /* HTML input forms use '+' for whitespace, rather than %20. */
*f = (const struct form)
{
- .key = http_decode_url(key),
- .value = http_decode_url(value)
+ .key = http_decode_url(key, true),
+ .value = http_decode_url(value, true)
};
if (!f->key || !f->value)
@@ -162,14 +163,6 @@ static int append_form(struct form **const forms, const char **const s,
goto end;
}
- /* HTML input forms use '+' for whitespace, rather than %20. */
- {
- char *c = f->value;
-
- while ((c = strchr(c, '+')))
- *c = ' ';
- }
-
*s = end;
ret = 0;