Message183516
There is a test failure. which leads me to believe that "Error message" may probably be relied upon by some applications.
FAIL: test_header_length (test.test_httpservers.BaseHTTPRequestHandlerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/export/home/buildbot/64bits/3.2.cea-indiana-amd64/build/Lib/test/test_httpservers.py", line 605, in test_header_length
self.assertEqual(result[0], b'HTTP/1.1 400 Line too long\r\n')
AssertionError: b'HTTP/1.1 400 Bad Request\r\n' != b'HTTP/1.1 400 Line too long\r\n'
I think, I am going revert the change I made first.
Because, looking at documentation and usage, leads me to believe that we are bit assuming much from a misleading example.
send_error(code, message) - message here is optional, but when sent, the server is responsible for displaying it.
It is *never* advertised that the traceback can be sent as a message.
However, I do think there a chance for improvement and that is the reason, I went ahead with the change.
The improvement can be send_error - response header could be the uniform shortmsg and response body can be the message that is sent by send_error(code, message). Now, this will be improvement and it should be discussed in that aspect rather than as a fix for anything.
Going ahead with the revert. Sorry for the mistake. |
|
Date |
User |
Action |
Args |
2013-03-05 09:54:15 | orsenthil | set | recipients:
+ orsenthil, karlcow, python-dev, Paul.Upchurch |
2013-03-05 09:54:15 | orsenthil | set | messageid: <1362477255.2.0.32638993464.issue12921@psf.upfronthosting.co.za> |
2013-03-05 09:54:15 | orsenthil | link | issue12921 messages |
2013-03-05 09:54:14 | orsenthil | create | |
|