aboutsummaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-04-30 23:43:10 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-05-01 04:13:25 +0200
commit7d1e41f9c51bc1525e5b0c86b9832562d65675c1 (patch)
treea44bee148f1b5176e9e3a7be5dee18a2cc88157b /http.h
parent291d951ee1428955179a5f3ed4435c1538045651 (diff)
downloadslcl-7d1e41f9c51bc1525e5b0c86b9832562d65675c1.tar.gz
http.c: Decode URL resource and parameters separately
Given the following contrived example request: /example%FB%DC&arg%DE1=examplevalue%AA slcl must decode each token separately, so that percent-encoded characters '&', '=' or '?' do not get accidently intepreted.
Diffstat (limited to 'http.h')
-rw-r--r--http.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/http.h b/http.h
index 8b3a286..ac1f51a 100644
--- a/http.h
+++ b/http.h
@@ -101,6 +101,6 @@ int http_response_add_header(struct http_response *r, const char *header,
const char *value);
char *http_cookie_create(const char *key, const char *value);
char *http_encode_url(const char *url);
-char *http_decode_url(const char *url);
+char *http_decode_url(const char *url, bool spaces);
#endif /* HTTP_H */