Message57783
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 |
|
| Date |
User |
Action |
Args |
| 2007-11-23 12:52:40 | samwyse | set | spambayes_score: 0.409261 -> 0.409261 recipients:
+ samwyse |
| 2007-11-23 12:52:40 | samwyse | set | spambayes_score: 0.409261 -> 0.409261 messageid: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> |
| 2007-11-23 12:52:39 | samwyse | link | issue1491 messages |
| 2007-11-23 12:52:39 | samwyse | create | |
|