Senthil Kumaran <sent...@uthcode.com> added the comment:

Hi Vinay, 

Normally, when one uses send_response() call, it is most often followed with
(multiple) send_header() calls and I updated the documentation keeping that in
mind.

Just calling of send_response() without any send_header and end_headers was an
interesting use-case and I started thinking if http.server's behavior should
change in order to support such a use-case.  But such a thing does not play
well with our recent change of caching and sending the headers.  For instance,
send_header and end_headers call might still be expected after send_response
and in which case, server's sending of headers would break. ( It would send it
two '\r\n' separated chunks, which is undesirable).

I think, it is best to add a note after send_response that it should be
followed by an end_header if the sever does not want to send any more headers.

I shall update this information.

Thanks!

----------

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

Reply via email to