Do not flush the socket after writing HTTP headers

This commit is contained in:
Kovid Goyal 2015-05-21 14:01:13 +05:30
parent 3e97ed39bd
commit 427781683e

View File

@ -575,7 +575,7 @@ class HTTPPair(object):
for header, value in sorted(self.outheaders.iteritems(), key=itemgetter(0)):
buf.append('%s: %s' % (header, value))
buf.append('')
self.flushed_write(b''.join((x + '\r\n').encode('ascii') for x in buf))
self.conn.socket_file.write(b''.join((x + '\r\n').encode('ascii') for x in buf))
def create_http_handler(handle_request):