fix SSL web-seed test

This commit is contained in:
arvidn
2015-07-16 00:44:03 -04:00
parent 3340bbbfb4
commit 94e41538b6
2 changed files with 23 additions and 10 deletions

View File

@@ -7,7 +7,6 @@ import os
import ssl
import gzip
import base64
import socket
chunked_encoding = False
keepalive = True
@@ -148,7 +147,7 @@ class http_handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
if not keepalive:
s.send_header("Connection", "close")
try:
s.request.shutdown(socket.SHUT_RD);
s.request.shutdown();
except Exception, e:
print 'Failed to shutdown read-channel of socket: ', e
@@ -175,7 +174,6 @@ class http_handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
s.send_header("Content-Length", "0")
s.end_headers()
if __name__ == '__main__':
port = int(sys.argv[1])
chunked_encoding = sys.argv[2] != '0'