mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 13:17:55 -05:00
Accept HTTP/1.1 response in network tests
GlimmerBlocker (http://GlimmerBlocker.org) and other proxies may intercept the web data and replace the HTTP/1.0 response with a HTTP/1.1 response. Modified test to accept either.
This commit is contained in:
committed by
Allan Odgaard
parent
b21fbd897e
commit
c98bc92b5d
@@ -84,7 +84,8 @@ public:
|
||||
char fileContent[fileSize];
|
||||
if(read(fd, fileContent, fileSize) == fileSize)
|
||||
{
|
||||
TS_ASSERT_EQUALS(status, "HTTP/1.0 200 OK");
|
||||
// GlimmerBlocker.org might cause a "HTTP/1.1" response
|
||||
TS_ASSERT(strcmp(status.c_str(),"HTTP/1.0 200 OK")==0 || strcmp(status.c_str(),"HTTP/1.1 200 OK")==0);
|
||||
TS_ASSERT(headers.find("content-length") != headers.end());
|
||||
TS_ASSERT_EQUALS(headers.find("content-length")->second, text::format("%zu", fileSize));
|
||||
TS_ASSERT_EQUALS(body, std::string(fileContent, fileContent + fileSize));
|
||||
|
||||
Reference in New Issue
Block a user