Fix s3server.py to stop truncating downloads of images and other non-text files
This commit is contained in:
parent
553145c755
commit
56fcc364f7
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue