Message195800
There is a dormant test in Lib/test/test_xmlrpc.py (line 579):
# [ch] The test 404 is causing lots of false alarms.
def XXXtest_404(self):
# send POST with http.client, it should return 404 header and
# 'Not Found' message.
conn = httplib.client.HTTPConnection(ADDR, PORT)
conn.request('POST', '/this-is-not-valid')
response = conn.getresponse()
conn.close()
self.assertEqual(response.status, 404)
self.assertEqual(response.reason, 'Not Found')
I decided to test it by removing 'XXX' and adding 'import httplib'. Yes, it hung up.
But then I looked at its sibling:
def test_partial_post(self):
# Check that a partial POST doesn't make the server loop: issue #14001.
conn = http.client.HTTPConnection(ADDR, PORT)
conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
conn.close()
I tried to use http module instead of httplib. It works. I tested it on Linux and Windows Vista. It works on both platforms.
Attached the patch to fix the resurrect and fix the test_404. |
|
Date |
User |
Action |
Args |
2013-08-21 15:57:23 | vajrasky | set | recipients:
+ vajrasky |
2013-08-21 15:57:23 | vajrasky | set | messageid: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za> |
2013-08-21 15:57:23 | vajrasky | link | issue18799 messages |
2013-08-21 15:57:23 | vajrasky | create | |
|