X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/20b988d5b901f459f95043c3702f1f9b104f3fbf..1b8caff3ad598744e4a0379b01fc95ca4838caa0:/sdk/python/tests/keepstub.py diff --git a/sdk/python/tests/keepstub.py b/sdk/python/tests/keepstub.py index e84230aaee..ef724ed5c5 100644 --- a/sdk/python/tests/keepstub.py +++ b/sdk/python/tests/keepstub.py @@ -65,6 +65,15 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler, object): def do_PUT(self): self.server._do_delay('request_body') + + # The comments at https://bugs.python.org/issue1491 implies that Python + # 2.7 BaseHTTPRequestHandler was patched to support 100 Continue, but + # reading the actual code that ships in Debian it clearly is not, so we + # need to send the response on the socket directly. + + self.wfile.write("%s %d %s\r\n\r\n" % + (self.protocol_version, 100, "Continue")) + data = self.rfile.read(int(self.headers.getheader('content-length'))) datahash = hashlib.md5(data).hexdigest() self.server.store[datahash] = data