flask 在 App Engine 和 dev_appserver 上处理 urlencoded 参数的方式不同

flask does not handle uriencoded parameters the same way on appengine and dev_appserver

我已经为此苦苦挣扎了一段时间,似乎无法弄明白。 我有一个 google appengine 项目,带有 flask,我需要一个处理 base64 URI 编码数据的路由。

这是我为这条路线准备的处理程序:

@app.route('/test/<data1>/<data2>', methods=['GET'])
def test(data1, data2):
    return "data1:%s<br>data2:%s"%(data1, data2)

现在,当 运行 dev_appserver:

时效果很好
http://localhost/test/hi/there
# returns:
data1:hello
data2:there

http://localhost/test/hi%2fho/there
# returns:
data1:hi%2Fho
data2:there

这是我所期望的。

在应用引擎的已部署版本上使用相同的 url:

我的问题:

感谢您的帮助

我在 google 的问题跟踪器上创建了 an issue,有人承认了它。

我想我们现在只能等待了。