Closed GoogleCodeExporter closed 8 years ago
Wow, this one took me a while to track down, and I'm relieved to tell you it's
not a
problem with httplib2. The issue appears to be that the yahoo server is
confused by
the Host: header that httplib2 sends. Httplib2 sends the port along with the
host,
which is allowed by RFC 2616, but the yahoo site only sends back the full HTML
response if the port is not supplied in the request. You can see this in action
by
overriding the host header and getting the full response:
import httplib2
h = httplib2.Http()
h, b = h.request('http://me.yahoo.com/christophermlenz', headers = {'host':
'me.yahoo.com'})
print b
Original comment by joe.gregorio@gmail.com
on 5 Sep 2008 at 2:34
Thanks for tracking this down! I wonder whether it'd be a good idea to omit the
port by default if it's not
explicitly specified in the request URI.
Original comment by cml...@gmx.de
on 5 Sep 2008 at 10:57
Original issue reported on code.google.com by
cmlenz
on 28 Feb 2008 at 10:23