mercurial/hgweb/common.py
changeset 4038 5ae460b1f6f0
parent 3886 abaee83ce0a6
child 4461 12e4d9524951
--- 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