]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Open static files in binary mode in static_url.
authorBen Darnell <ben@bendarnell.com>
Fri, 25 Feb 2011 00:55:35 +0000 (16:55 -0800)
committerBen Darnell <ben@bendarnell.com>
Fri, 25 Feb 2011 00:55:35 +0000 (16:55 -0800)
tornado/web.py

index 36a860e5c63a6ea42ab98f8deefd091d582bf1ca..9608908aa722cfbac3d160523ede589b19b4f1aa 100644 (file)
@@ -797,7 +797,7 @@ class RequestHandler(object):
                                 path)
         if abs_path not in hashes:
             try:
-                f = open(abs_path)
+                f = open(abs_path, "rb")
                 hashes[abs_path] = hashlib.md5(f.read()).hexdigest()
                 f.close()
             except: