[Twisted-Python] Problem fetching page with getPage

Glyph Lefkowitz glyph at twistedmatrix.com
Sat Jan 2 16:21:04 EST 2010

On Jan 2, 2010, at 4:14 PM, Terry Jones wrote:

> Thanks for the helpful reply - I can now make the call successfully.  The
> difference turned out to be that httplib puts a Host: hostname:port header
> into its calls, whereas getPage uses just Host: hostname. Plus there was
> something else going on in some other code I'm using that made this a
> problem (it was calculating a signature based on host:port).

I'm glad that you tracked this down!

According to comments on <http://twistedmatrix.com/trac/ticket/886>, this problem was addressed in the new HTTP client implementation.  Have you considered using the new twisted.web.client.Agent instead of getPage?

More information about the Twisted-Python mailing list