diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-27 15:28:17 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-27 16:29:06 +0100 |
| commit | 6353beb60ceafbc743bde96684d666582195192f (patch) | |
| tree | 687bac388242712508944574531af67b14658b9c /include | |
| parent | d783e794c2fa6a9e6bffff9f41cdb7e8033bf3c3 (diff) | |
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.
Diffstat (limited to 'include')
| -rw-r--r-- | include/libweb/http.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 */ |
