mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 06:51:04 +08:00
Merge pull request #1670 from cesanta/index.gx-test
Add unit test for gzipped index when / is requested
This commit is contained in:
commit
44a0fa0986
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…
x
Reference in New Issue
Block a user