From: Tarek Ziade Date: Sat, 21 May 2011 21:59:09 +0000 (+0200) Subject: added the Content-Length header. that fixes the weird packaging.pypi.errors.HashDoesN... X-Git-Tag: v3.3.0a1~2199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c40f60c32dbc97fc1c434e3501621902e46121f;p=python added the Content-Length header. that fixes the weird packaging.pypi.errors.HashDoesNotMatch errors --- diff --git a/Lib/packaging/tests/pypi_server.py b/Lib/packaging/tests/pypi_server.py index 6a72afbdca..372a54c796 100644 --- a/Lib/packaging/tests/pypi_server.py +++ b/Lib/packaging/tests/pypi_server.py @@ -226,6 +226,7 @@ class PyPIRequestHandler(SimpleHTTPRequestHandler): data = file.read().encode() headers = [('Content-type', 'text/html')] + headers.append(('Content-Length', len(data))) self.make_response(data, headers=headers) except IOError: