fix test_http_connection for windows

This commit is contained in:
Arvid Norberg 2014-01-22 02:59:09 +00:00
parent 9d03019050
commit 8bf283c7fe
2 changed files with 7 additions and 1 deletions

View File

@ -197,7 +197,6 @@ int test_main()
TEST_CHECK(!ec);
if (ec) fprintf(stderr, "file error: %s\n", ec.message().c_str());
test_file.close();
std::system("gzip -9 -c test_file > test_file.gz");
proxy_settings ps;
ps.hostname = "127.0.0.1";

View File

@ -3,9 +3,16 @@ import SimpleHTTPServer
import sys
import os
import ssl
import gzip
chunked_encoding = False
fin = open('test_file', 'rb')
f = gzip.open('test_file.gz', 'wb')
f.writelines(fin)
f.close()
fin.close()
class http_server_with_timeout(BaseHTTPServer.HTTPServer):
allow_reuse_address = True
timeout = 120