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

scaven scaven at bk.ru
Mon Feb 14 16:15:52 CET 2011


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


More information about the docs mailing list