python-oauth2 icon indicating copy to clipboard operation
python-oauth2 copied to clipboard

a tiny workaround for httplib2 redirect bug

Open ivishnevs opened this issue 8 years ago • 1 comments
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)

ivishnevs avatar Feb 07 '17 12:02 ivishnevs

Codecov Report

Merging #214 into master will not impact coverage by -0.2%.

@@            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 data Powered by Codecov. Last update 6689960...b8bf881. Read the comment docs.

codecov-io avatar Feb 07 '17 12:02 codecov-io