'If a request uses the I{chunked} transfer encoding, but provides an
invalid chunk length value, the request fails with a 400 error.'

def test_malformedChunkedEncoding(self):

    httpRequest = "GET    /    HTTP/1.1\nContent-Type:    text/plain\nTransfer-Encoding:    chunked\n\nMALFORMED_LINE_THIS_SHOULD_BE_'6'\nHello,\n14\n    spam,eggs    spam    spam\n0\n\n"
    didRequest = []
    class MyRequest(http.Request, ):
        def process(self):
            didRequest.append(True)
    channel = self.runRequest(httpRequest, MyRequest, success=False)
    self.assertFalse(didRequest, 'Request.process    called')
    self.assertEqual(channel.transport.value(), 'HTTP/1.1    400    Bad    Request\r\n\r\n')
    self.assertTrue(channel.transport.disconnecting)
