在Google App Engine/Python产品上使用请求url路径中的%2F时返回404

在Google App Engine/Python产品上使用请求url路径中的%2F时返回404,python,google-app-engine,Python,Google App Engine,当我在Google App Engine/Python(仅在生产服务器上,而不是在mac开发服务器上)上使用url路径中包含“%2f”的参数时,我得到404 not found响应 我使用Kay-framework()作为GAE/Python框架 我设置url路由如下 Rule('/rest/article/<string:article_id>', endpoint='article',view='myapp.views.article'), 但是,当我在GAE生产服务器上向这个

当我在Google App Engine/Python(仅在生产服务器上,而不是在mac开发服务器上)上使用url路径中包含“%2f”的参数时,我得到404 not found响应

我使用Kay-framework()作为GAE/Python框架

我设置url路由如下

Rule('/rest/article/<string:article_id>', endpoint='article',view='myapp.views.article'),
但是,当我在GAE生产服务器上向这个url发送请求时,GAE服务器返回404

http://foo-bar-app.appspot.com/rest/article/foobar%2Bfoobar%2Ffoobar => 404
我必须使用的参数包括“/”(url编码为“%2f”)


有什么办法解决这个问题吗?

我自己也遇到过这个问题。由于我可以控制URL,因此可以转义“%”本身,然后GAE可以正确识别它。即:

linkUrl = string.replace(linkUrl, '%2F', '%252F') # Workaround to avoid %2F issue on GAE servers

丑陋,但在我的情况下有效。

谢谢你的解决方案。这一定是人们一直在谈论的进步。。。apache变得越来越无趣
linkUrl = string.replace(linkUrl, '%2F', '%252F') # Workaround to avoid %2F issue on GAE servers