Commit 3a3f4991 by willmcgugan@gmail.com

Fixes an issue serving binary files

parent c564dcf1
...@@ -68,7 +68,7 @@ class FSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): ...@@ -68,7 +68,7 @@ class FSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
ctype = self.guess_type(path) ctype = self.guess_type(path)
try: try:
info = self._fs.getinfo(path) info = self._fs.getinfo(path)
f = self._fs.open(path, 'r') f = self._fs.open(path, 'rb')
except FSError, e: except FSError, e:
self.send_error(404, str(e)) self.send_error(404, str(e))
return None return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment