diff options
| -rw-r--r-- | main.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -145,6 +145,14 @@ static struct form *append_form(struct form *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 = forms; @@ -818,17 +826,6 @@ static int createdir(const struct http_payload *const p, goto end; } - /* HTML input forms use '+' for whitespace, rather than %20. */ - { - char *c = name, *d = dir; - - while ((c = strchr(c, '+'))) - *c = ' '; - - while ((d = strchr(d, '+'))) - *d = ' '; - } - const char *const root = auth_dir(a); if (!root) |
