From 9ac68fd76c43523ea3aa3bcc4f9fef0ac2cee830 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 12 Nov 2023 00:14:05 +0100 Subject: http: Make http_decode_url return int So far, it was not possible callers to distinguish between decoding errors, as caused by ill-formed input, from fatal errors. --- include/libweb/http.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libweb/http.h b/include/libweb/http.h index 68ffb9a..80030fb 100644 --- a/include/libweb/http.h +++ b/include/libweb/http.h @@ -105,6 +105,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, bool spaces); +int http_decode_url(const char *url, bool spaces, char **out); #endif /* HTTP_H */ -- cgit v1.2.3