mamaduckmaster / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

HEAD requests with redirects become GETs #288

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
if using the following code to visit a url that can lead to a temporary redirect

import httplib2
httplib2.debuglevel = 1
h = httplib2.Http(".cache")
resp, content = h.request(‘url that can lead to a temporary 
redirect’,’HEAD’)

when httplib2 automatically follows the redirect ,i.e. a second request has 
been made ,the request method will become ‘GET ’ instead of ’HEAD’

I think this is bug ,hope you can make the HTTP request method keep unchanged 
during one http session

tested on httplib2-0.8 on WinXP

Original issue reported on code.google.com by redstone...@163.com on 28 May 2013 at 11:00