mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 02:59:01 +08:00
Add unit test for gzipped index when / is requested
This commit is contained in:
parent
1a6bfb65e6
commit
4d9338323a
BIN
test/data/dredirgz/index.html.gz
Normal file
BIN
test/data/dredirgz/index.html.gz
Normal file
Binary file not shown.
@ -650,6 +650,10 @@ static void test_http_server(void) {
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /dredir/ HTTP/1.0\n\n") == 200);
|
||||
ASSERT(cmpbody(buf, "hi\n") == 0);
|
||||
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /dredirgz/ HTTP/1.0\n\n") == 200);
|
||||
ASSERT(cmpheader(buf, "Content-Type", "text/html; charset=utf-8"));
|
||||
ASSERT(cmpheader(buf, "Content-Encoding", "gzip"));
|
||||
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /..ddot HTTP/1.0\n\n") == 301);
|
||||
ASSERT(fetch(&mgr, buf, url, "GET /..ddot/ HTTP/1.0\n\n") == 200);
|
||||
ASSERT(cmpbody(buf, "hi\n") == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user