]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
win32 needs to open the files as binary
authorunknown <mgenti@.(none)>
Wed, 10 Mar 2010 21:40:36 +0000 (15:40 -0600)
committerunknown <mgenti@.(none)>
Wed, 10 Mar 2010 21:40:36 +0000 (15:40 -0600)
tornado/web.py

index d400c3b89316caf756b9d157a90dc66fd1489e45..673a360a30228701192a694fafc6003d0aebf6ed 100644 (file)
@@ -1133,7 +1133,7 @@ class StaticFileHandler(RequestHandler):
         if not include_body:
             return
         self.set_header("Content-Length", stat_result[stat.ST_SIZE])
-        file = open(abspath, "r")
+        file = open(abspath, "rb")
         try:
             self.write(file.read())
         finally: