From 6353beb60ceafbc743bde96684d666582195192f Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 27 Feb 2026 15:28:17 +0100 Subject: Add http_strcasecmp(3) POSIX.1-2008 does not any locale-specific version of strcasecmp(3), so conversions to lowercase depend on the system locale. Since HTTP header fields must be checked without case sensitivity and not depend on the system locale, a specialised function that forces the "POSIX" locale is required. --- include/libweb/http.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/libweb/http.h b/include/libweb/http.h index 41e1dce..4548efc 100644 --- a/include/libweb/http.h +++ b/include/libweb/http.h @@ -150,6 +150,7 @@ char *http_cookie_create(const char *key, const char *value, const struct tm *exp); char *http_encode_url(const char *url); int http_decode_url(const char *url, bool spaces, char **out); +int http_strcasecmp(const char *s1, const char *s2); int http_strncasecmp(const char *s1, const char *s2, size_t n); #endif /* HTTP_H */ -- cgit v1.2.3