mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fixed the serve.py script.
The application object must return an iterable yielding bytestrings.
This commit is contained in:
commit
f4c9664a24
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ def app(environ, respond):
|
||||||
return util.FileWrapper(open(fn, "rb"))
|
return util.FileWrapper(open(fn, "rb"))
|
||||||
else:
|
else:
|
||||||
respond('404 Not Found', [('Content-Type', 'text/plain')])
|
respond('404 Not Found', [('Content-Type', 'text/plain')])
|
||||||
return ['not found']
|
return [b'not found']
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
path = sys.argv[1]
|
path = sys.argv[1]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue