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 samwyse
Recipients samwyse
Date 2007-11-23.12:52:39
SpamBayes Score 0.4092613
Marked as misclassified No
Message-id <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za>
In-reply-to
Content
RFC 2616 sec 8.2.3 states, "An origin server that sends a 100 (Continue)
response MUST ultimately send a final status code, once the request body
is received and processed, unless it terminates the transport connection
prematurely."  The obvious way to do this is to invoke the
'send_response' method twice, once with a code of 100, then with the
final code.  However, BaseHTTPServer will always send two headers
('Server' and 'Date') when it send a response.  One possible fix is to
add an option to the method to suppress sending headers; another is to
add the following code to the 'send_response' method, immediately prior
to the calls to 'self.send_header':

        if code == 100:
            return

The more paranoid among us may wish to use this code instead:

        if code == 100:
            expectation = self.headers.get('Expect', "")
            if expectation.lower() == '100-continue':
                return
History
Date User Action Args
2007-11-23 12:52:40samwysesetspambayes_score: 0.409261 -> 0.4092613
recipients: + samwyse
2007-11-23 12:52:40samwysesetspambayes_score: 0.409261 -> 0.409261
messageid: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za>
2007-11-23 12:52:39samwyselinkissue1491 messages
2007-11-23 12:52:39samwysecreate