From: Ben Darnell Date: Fri, 25 Feb 2011 00:55:35 +0000 (-0800) Subject: Open static files in binary mode in static_url. X-Git-Tag: v2.0.0~85^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7281ff90f98508476adab3c95b7d19cdbd2610a5;p=thirdparty%2Ftornado.git Open static files in binary mode in static_url. --- diff --git a/tornado/web.py b/tornado/web.py index 36a860e5c..9608908aa 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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: