Last active
June 24, 2016 18:08
-
-
Save anandology/72168ffbf33e87ebcfb419d12fd5e7cd to your computer and use it in GitHub Desktop.
Code reproduce a web.py bug caused with Python 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Program to reproduce a bug that appears when used with Python 3. | |
How to reproduce: | |
1. Run the dev server | |
$ python unibug.py | |
http://0.0.0.0:8080/ | |
2. Open the following URL in your browser. | |
http://0.0.0.0:8080/ | |
3. See the server crash with UnicodeEncodeError | |
""" | |
import web | |
urls = ("/", "index") | |
app = web.application(urls, globals()) | |
class index: | |
def GET(self): | |
return "\u0C05\u0C06" | |
if __name__ == "__main__": | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment