Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Tools/scripts/serve.py
1 parent 6b54e1f commit f767f08Copy full SHA for f767f08
2 files changed
Misc/NEWS
@@ -85,6 +85,12 @@ Library
85
86
- Add lfu_cache() and lru_cache() decorators to the functools module.
87
88
+Tools/Demos
89
+-----------
90
+
91
+- Issue #8867: Fix ``Tools/scripts/serve.py`` to work with files containing
92
+ non-ASCII content.
93
94
95
What's New in Python 3.2 Alpha 1?
96
=================================
Tools/scripts/serve.py
@@ -19,7 +19,7 @@ def app(environ, respond):
19
20
if os.path.exists(fn):
21
respond('200 OK', [('Content-Type', type)])
22
- return util.FileWrapper(open(fn))
+ return util.FileWrapper(open(fn, "rb"))
23
else:
24
respond('404 Not Found', [('Content-Type', 'text/plain')])
25
return ['not found']
0 commit comments