[docs] Library Reference, asyncore module, basic HTTP client

Sandro Tosi sandro.tosi at gmail.com
Thu Feb 17 00:27:51 CET 2011


Hi scaven,
thanks for your email.

On Mon, Feb 14, 2011 at 16:15, scaven <scaven at bk.ru> wrote:
> re
>
> the less important addition to my prev mail
> in
> http://docs.python.org/library/asyncore.html#asyncore-example-basic-http-client
>
> change
>        self.buffer = 'GET %s HTTP/1.0\r\n\r\n' % path
>
> to
>        self.buffer = 'GET {0} HTTP/1.0\r\nHOST: {1}\r\n\r\n'.format(path,
> host)
>
> this will get the real page (status 200) instead of "found" (302) page

I've opened a new issue[1] on the tracker with a patch to fix what
you've reported.

[1] http://bugs.python.org/issue11227

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list