#11227: use Host header in asyncore example.
This commit is contained in:
parent
12a6153aee
commit
45ec333c72
|
@ -263,7 +263,8 @@ implement its socket handling::
|
|||
asyncore.dispatcher.__init__(self)
|
||||
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.connect( (host, 80) )
|
||||
self.buffer = bytes('GET %s HTTP/1.0\r\n\r\n' % path, 'ascii')
|
||||
self.buffer = bytes('GET %s HTTP/1.0\r\nHost: %s\r\n\r\n' %
|
||||
(path, host), 'ascii')
|
||||
|
||||
def handle_connect(self):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue