Commit f767f08e authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #8867: Fix `Tools/scripts/serve.py` to work with files containing

non-ASCII content.
parent 6b54e1f7
......@@ -85,6 +85,12 @@ Library
- Add lfu_cache() and lru_cache() decorators to the functools module.
Tools/Demos
-----------
- Issue #8867: Fix ``Tools/scripts/serve.py`` to work with files containing
non-ASCII content.
What's New in Python 3.2 Alpha 1?
=================================
......
......@@ -19,7 +19,7 @@ def app(environ, respond):
if os.path.exists(fn):
respond('200 OK', [('Content-Type', type)])
return util.FileWrapper(open(fn))
return util.FileWrapper(open(fn, "rb"))
else:
respond('404 Not Found', [('Content-Type', 'text/plain')])
return ['not found']
......
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