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 vajrasky
Recipients vajrasky
Date 2013-08-21.15:57:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There is a dormant test in Lib/test/ (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()

        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')

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:23vajraskysetrecipients: + vajrasky
2013-08-21 15:57:23vajraskysetmessageid: <>
2013-08-21 15:57:23vajraskylinkissue18799 messages
2013-08-21 15:57:23vajraskycreate