Fix s3server.py to stop truncating downloads of images and other non-text files

This commit is contained in:
Michael Leonhard 2013-01-20 16:48:05 -08:00
parent 553145c755
commit 56fcc364f7
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class ObjectHandler(BaseRequestHandler):
self.set_header("Content-Type", "application/unknown")
self.set_header("Last-Modified", datetime.datetime.utcfromtimestamp(
info.st_mtime))
object_file = open(path, "r")
object_file = open(path, "rb")
try:
self.finish(object_file.read())
finally: