python - 4 月份的 urlfetch 更改和 simpleoauth

标签 python google-app-engine python-2.7 oauth urlfetch

我正在使用这个crhym3/simpleauth在我的项目中使用 Google、Linkedin 和 Twitter 进行 oauth 身份验证。它使用 GAE 的 urlfetch。

Google 计划在 4 月下旬更改 urlfetch 的行为。我在这里转载他们的通知:

Currently, the URL Fetch service preserves your original HTTP method (e.g., GET, POST) when it receives and responds to a 302 Moved Temporarily response. Modern user agents typically issue a GET request in response to a 302. After the update, URL Fetch will only issue a GET request after receiving a 302 response, rather than preserving the original method. This may cause requests to be routed differently and/or return 404s or other errors, and will drop the message body from POST requests.

我已在项目论坛上发布了问题,但尚未收到回复。

我的问题是:

测试该软件免受更改影响的最佳方法是什么?我正在考虑将 follow_redirects=False 添加到 urlfetch 调用中,以查看我从 google、linkedin 和 twitter 获得的重定向。

最佳答案

他们只是遵循规范。我非常确定它们(google、linkedin 和 twitter)都按照规范中的定义接受重定向后的 GET 请求。

所以我认为你不需要做任何事情。

关于python - 4 月份的 urlfetch 更改和 simpleoauth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29312094/

相关文章:

python - TensorFlow -tensorflow.python.framework.errors_impl.FailedPreconditionError

python - Django 应用程序 SSL 套接字连接到固件

python - 建模谷歌数据存储/python

python-2.7 - Python 中的 Tix 教程

python - 检查 YAML 文件中的数据在 python 中是否按字母顺序排列

python - 如何检查数据库中的表是否存在以及如何显示错误?

google-app-engine - 保存和加载自定义类型

python - 如何在 GAE 上捕获 Python 中的 DNS 查找失败错误?

python - 重置类统计数据的想法

python-2.7 - 修改 Pandas 图中的背景颜色?