summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/asyncore.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index eca4d1b..b6fe2bb 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -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