Add unicode filename

This commit is contained in:
Sergey Lyubka 2021-07-22 20:16:50 +01:00
parent 0d5d7bb26f
commit a771d6a19d
2 changed files with 5 additions and 0 deletions

1
test/data/київ.txt Normal file
View File

@ -0,0 +1 @@
є

View File

@ -488,6 +488,10 @@ static void test_http_server(void) {
ASSERT(fetch(&mgr, buf, url, "GET /no_reason HTTP/1.0\n\n") == 200);
ASSERT(cmpbody(buf, "ok") == 0);
// Fetch file with unicode chars in filename
ASSERT(fetch(&mgr, buf, url, "GET /київ.txt HTTP/1.0\n\n") == 200);
ASSERT(cmpbody(buf, "є\n") == 0);
{
extern char *mg_http_etag(char *, size_t, mg_stat_t *);
char etag[100];