From 427781683e82ec96b89054afb0c0a10456837de3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 May 2015 14:01:13 +0530 Subject: [PATCH] Do not flush the socket after writing HTTP headers --- src/calibre/srv/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/http.py b/src/calibre/srv/http.py index 3c0003a5ea..e10f4f7665 100644 --- a/src/calibre/srv/http.py +++ b/src/calibre/srv/http.py @@ -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):