Comment

David

The following will setup an HTTP server to repro (set the sleep to be greater than your read timeout):
import ssl
from time import sleep
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer

PORT = 8001

class CustomHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        print "SLEEP"
        self.send_response(200)
        self.send_header('Transfer-Encoding', 'chunked')
        self.send_header('Content-type', 'text/plain')
        self.end_headers()
        self.wfile.write('Hello')
        sleep(5)
        self.wfile.write(', world!')
        print "WAKE"
        pass

httpd = HTTPServer(("", PORT), CustomHandler)
httpd.socket = ssl.wrap_socket(httpd.socket, keyfile='/home/local/ANT/schdavid/tmp/key.pem', certfile='/home/local/ANT/schdavid/tmp/cert.pem')

try:
    httpd.serve_forever()
except KeyboardInterrupt:
    print
    print 'Goodbye'
    httpd.socket.close()

Parent comment

David

Does not work if requests fails to read a chunked response :(