Mercurial > p > roundup > code
comparison roundup/cgi/wsgi_handler.py @ 6387:0da655d1498d
Remove Connection: close header for 501 error handling rest
Ralf doesn't know why the "Connection: close" header was added. Was
there since the original code to support OPTIONS verb was added.
He agrees it can be removed.
Enable test for that code path.
Commit the code not just the test....
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 26 Apr 2021 12:17:15 -0400 |
| parents | 0343b6fea4b9 |
| children | d32d43e4a5ba |
comparison
equal
deleted
inserted
replaced
| 6386:2a2da73e1e26 | 6387:0da655d1498d |
|---|---|
| 96 # This I hope will result in self.form=None | 96 # This I hope will result in self.form=None |
| 97 environ['CONTENT_LENGTH'] = 0 | 97 environ['CONTENT_LENGTH'] = 0 |
| 98 else: | 98 else: |
| 99 code = 501 | 99 code = 501 |
| 100 message, explain = BaseHTTPRequestHandler.responses[code] | 100 message, explain = BaseHTTPRequestHandler.responses[code] |
| 101 request.start_response([('Content-Type', 'text/html'), | 101 request.start_response([('Content-Type', 'text/html')], |
| 102 ('Connection', 'close')], code) | 102 code) |
| 103 request.wfile.write(s2b(DEFAULT_ERROR_MESSAGE % locals())) | 103 request.wfile.write(s2b(DEFAULT_ERROR_MESSAGE % locals())) |
| 104 return [] | 104 return [] |
| 105 | 105 |
| 106 # need to strip the leading '/' | 106 # need to strip the leading '/' |
| 107 environ["PATH_INFO"] = environ["PATH_INFO"][1:] | 107 environ["PATH_INFO"] = environ["PATH_INFO"][1:] |
