This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients giampaolo.rodola, orsenthil, python-dev, skrah, vinay.sajip
Date 2011-05-11.07:53:07
SpamBayes Score 5.2864343e-06
Marked as misclassified No
Message-id <20110511075259.GA5060@kevin>
In-reply-to <1305096139.29.0.663497653883.issue12039@psf.upfronthosting.co.za>
Content
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!
History
Date User Action Args
2011-05-11 07:53:09orsenthilsetrecipients: + orsenthil, vinay.sajip, giampaolo.rodola, skrah, python-dev
2011-05-11 07:53:07orsenthillinkissue12039 messages
2011-05-11 07:53:07orsenthilcreate