From 0b6f28d96a6ba90a88f6ffdc712a95ff49122fcf Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 30 Apr 2023 23:43:10 +0200 Subject: 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. --- http.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http.h') 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 */ -- cgit v1.2.3