trino-python-client
trino-python-client copied to clipboard
Enable prepared statements over http.client._MAXLINE limit
Fixes #148
Headers can become much longer then what is currently suported in Python's http.client. This code patches the header parsing from http.client to be able to parse the headers coming back from the Trino server.
Test is included. when removing the disable_header_limit() in client.py, the test will fail with requests.exceptions.ConnectionError: ('Connection aborted.', LineTooLong('got more than 65536 bytes when reading header line')).