How to use the httptools.HttpParserInvalidURLError function in httptools

To help you get started, we’ve selected a few httptools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MagicStack / httptools / tests / test_parser.py View on Github external
def test_parser_request_3(self):
        p = httptools.HttpRequestParser(None)
        with self.assertRaises(httptools.HttpParserInvalidURLError):
            p.feed_data(b'POST  HTTP/1.2')
github MagicStack / httptools / tests / test_parser.py View on Github external
def test_parser_url_9(self):
        with self.assertRaisesRegex(httptools.HttpParserInvalidURLError,
                                    r'a\\x00aa'):
            self.parse(b'dsf://a\x00aa')