Index: util/net/http_transport_test_server.py |
diff --git a/util/net/http_transport_test_server.py b/util/net/http_transport_test_server.py |
index ac6c834cdba33907783f41ecd004675981951afc..51d722e13299ed17d4c0eff1cfbef2f6bc3cc158 100755 |
--- a/util/net/http_transport_test_server.py |
+++ b/util/net/http_transport_test_server.py |
@@ -77,6 +77,8 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
body = self.rfile.read(length) |
self.send_response(self.response_code) |
+ self.end_headers() |
+ |
writer.write(body) |
writer.flush() |
@@ -118,6 +120,10 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): |
def Main(): |
+ if sys.platform == 'win32': |
+ import os, msvcrt |
+ msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
+ |
# Start the server. |
server = BaseHTTPServer.HTTPServer(('127.0.0.1', 0), RequestHandler) |