# HG changeset patch # User Alexis S. L. Carvalho # Date 1169165786 7200 # Node ID 5ae460b1f6f0b996863889158ee4f67f3e4514a3 # Parent bbdba01cce28a329de71380441935c198cda5069 Don't use ints in HTTP headers diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py +++ b/mercurial/hgweb/common.py @@ -38,7 +38,7 @@ def staticfile(directory, fname, req): os.stat(path) ct = mimetypes.guess_type(path)[0] or "text/plain" req.header([('Content-type', ct), - ('Content-length', os.path.getsize(path))]) + ('Content-length', str(os.path.getsize(path)))]) return file(path, 'rb').read() except (TypeError, OSError): # illegal fname or unreadable file