奇怪的等号“=”插入到
只能在 Google App Engine 服务器上重现此问题,而不能在我的开发服务器上重现。 仅当我将网页的一部分复制粘贴到
我搜索了Google App Engine论坛并找到了两个相关帖子,但仍然没有弄清楚。有人可以给我更多提示吗?谢谢!
这是我的代码:
HTML
< form method = "post" action = "{% if action %}{{ action }}{% endif %}" enctype = "multipart/form-data" accept - charset = "UTF-8" >
< textarea name = "textbox" id = "textbox" rows = "3" cols = "50" wrap = "soft" >
Python
t1 = self.request.get("textbox")
t2 = self.request.POST["textbox"]
logging.info("request get: %s, %s" % (t1, t2))
Can only reproduce this issue on Google App Engine Server, not on my development server.
Only when I copy-paste a part of web page to the <textarea>
.
I searched Google App Engine forum and found two related posts, but still didn't figure it out. Can somebody give me more hint? Thanks!
Here is my code:
HTML
< form method = "post" action = "{% if action %}{{ action }}{% endif %}" enctype = "multipart/form-data" accept - charset = "UTF-8" >
< textarea name = "textbox" id = "textbox" rows = "3" cols = "50" wrap = "soft" >
Python
t1 = self.request.get("textbox")
t2 = self.request.POST["textbox"]
logging.info("request get: %s, %s" % (t1, t2))
Related Posts:
http://code.google.com/appengine/forum/python-forum.html?place=topic%2Fgoogle-appengine-python%2FOYfn9tXncUk%2Fdiscussion
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢用户 Djidjadji 在 Google App Engine 论坛上的提示,我发现
quopri.decodestring()
可以帮助我!这是我使用的代码。希望它可以节省其他沮丧的程序员的时间:)Thanks to a hint on Google App Engine Forums from user Djidjadji I found that
quopri.decodestring()
helps me out! Here is the code I used. Hope it can save other dispirited programmers' time :)这是 Google App Engine 过时的 WebOb 库中的错误 。
只需在您的 app.yaml 文件中添加此较新版本的 WebOb 即可。
乔什·卡斯韦尔 (Josh Caswell) 提议的“quopri”修复方案仅为租金的一半。它不适用于非 ASCII 字符。
This is a bug in the outdated WebOb library of Google App Engine.
Just add add this newer version of WebOb in your app.yaml file.
The proposed
quopri
fix by Josh Caswell is only half the rent. It doesn't work with non-ascii characted.