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-07-20 23:52:54 +0200
commit0b6f28d96a6ba90a88f6ffdc712a95ff49122fcf (patch)
treedf82e7af15f9cb14a88cb04de209c4df658af0f6 /http.h
parent7b729f89e6cadfa508d95132625ba15f36fc7c2a (diff)
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 */