Martin Panter <vadmium...@gmail.com> added the comment:

Sorry William, I forgot the client was waiting to read. But I don’t understand 
why your Connection field (which comes after the status line) allows the Python 
client to read the status line. Perhaps there is some malware scanner, 
firewall, or other proxy that intercepts the HTTP protocol? (I encountered 
something similar at work recently.)

You said “my suggestion will never work”, but did you try setting 
“close_connection” on its own:

def do_GET(self):
    self.send_response(HTTPStatus.OK)
    self.end_headers()
    self.close_connection = True  # Terminate response body to proxy

You tried adding Content-Length, but did you try “Content-Length: 0”:

def do_GET(self):
    self.send_response(HTTPStatus.OK)
    self.send_header("Content-Length", "0")  # Stop proxy reading body
    self.end_headers()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25095>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to