]> granicus.if.org Git - python/commitdiff
added the Content-Length header. that fixes the weird packaging.pypi.errors.HashDoesN...
authorTarek Ziade <tarek@ziade.org>
Sat, 21 May 2011 21:59:09 +0000 (23:59 +0200)
committerTarek Ziade <tarek@ziade.org>
Sat, 21 May 2011 21:59:09 +0000 (23:59 +0200)
Lib/packaging/tests/pypi_server.py

index 6a72afbdca717ab7f49352d97900b6719efdf9d4..372a54c79611c5a3bada0c291a01d6e0493934b5 100644 (file)
@@ -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: