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 <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-08-21 15:57:23vajraskysetrecipients: + vajrasky
2013-08-21 15:57:23vajraskysetmessageid: <1377100643.52.0.970396135479.issue18799@psf.upfronthosting.co.za>
2013-08-21 15:57:23vajraskylinkissue18799 messages
2013-08-21 15:57:23vajraskycreate