Don't use ints in HTTP headers
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Thu, 18 Jan 2007 22:16:26 -0200
changeset 4038 5ae460b1f6f0
parent 4037 bbdba01cce28
child 4039 cc08d2543593
child 4040 55578a8d7e84
Don't use ints in HTTP headers
mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py	Wed Jan 17 22:19:36 2007 +0100
+++ b/mercurial/hgweb/common.py	Thu Jan 18 22:16:26 2007 -0200
@@ -38,7 +38,7 @@
         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