python-oauth2
python-oauth2 copied to clipboard
a tiny workaround for httplib2 redirect bug
trafficstars
if 'location' header is in response object, http2lib try to redirect and use self.request method with body=None argument; this behavior implies a problem like this - https://github.com/joestump/python-oauth2/issues/203 and etc.
if response.status in [302, 303]:
redirect_method = "GET"
body = None <---------
(response, content) = self.request(
location, method=redirect_method, body=body,
headers=headers, redirections=redirections - 1)
Codecov Report
@@ Coverage Diff @@
## master #214 +/- ##
=========================================
- Coverage 96.05% 95.86% -0.2%
=========================================
Files 5 5
Lines 482 484 +2
=========================================
+ Hits 463 464 +1
- Misses 19 20 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| oauth2/init.py | 99.77% <50%> (-0.23%) |
:x: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 6689960...b8bf881. Read the comment docs.