Library Reference, asyncore module, basic HTTP client
re the less important addition to my prev mail in http://docs.python.org/library/asyncore.html#asyncore-example-basic-http-cli... 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
Hi scaven, thanks for your email. On Mon, Feb 14, 2011 at 16:15, scaven <scaven@bk.ru> wrote:
re
the less important addition to my prev mail in http://docs.python.org/library/asyncore.html#asyncore-example-basic-http-cli...
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
participants (2)
-
Sandro Tosi
-
scaven