You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue occurs both on the current stable HTTPie release, 0.9.9, and on the bleeding-edge development version de38f86 installed using pip3 install --upgrade https://github.com/jkbrzt/httpie/archive/master.tar.gz.
After installing httpie-http2 with pip3 install httpie-http2, every attempt to make an HTTP/2 request will fail, printing the error message http: error: ProtocolError: Connection-specific header field present: b'connection'.
The full --debug output is:
$ http https://google.com --debugHTTPie 0.9.9Requests 2.13.0Pygments 2.2.0Python 3.6.0 (default, Dec 24 2016, 08:01:42)[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]/usr/local/opt/python3/bin/python3.6Darwin 16.5.0<Environment { "colors": 256, "config": { "__meta__": { "about": "HTTPie configuration file", "help": "https://github.com/jkbrzt/httpie#config", "httpie": "1.0.0-dev" }, "default_options": "[]" }, "config_dir": "/Users/dani/.httpie", "is_windows": false, "stderr": "<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>", "stderr_isatty": true, "stdin": "<_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>", "stdin_encoding": "UTF-8", "stdin_isatty": true, "stdout": "<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>", "stdout_encoding": "UTF-8", "stdout_isatty": true}>>>> requests.request(**{ "allow_redirects": false, "auth": "None", "cert": "None", "data": {}, "files": {}, "headers": { "User-Agent": "HTTPie/0.9.9" }, "method": "get", "params": {}, "proxies": {}, "stream": true, "timeout": 30, "url": "https://google.com", "verify": true})http: error: ProtocolError: Connection-specific header field present: b'connection'.Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/hyper/common/connection.py", line 103, in request method=method, url=url, body=body, headers=headers File "/usr/local/lib/python3.6/site-packages/hyper/http11/connection.py", line 169, in request self.connect() File "/usr/local/lib/python3.6/site-packages/hyper/http11/connection.py", line 130, in connect raise TLSUpgrade(proto, sock)hyper.common.exceptions.TLSUpgradeDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/bin/http", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/httpie/__main__.py", line 11, in main sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/httpie/core.py", line 227, in main log_error=log_error, File "/usr/local/lib/python3.6/site-packages/httpie/core.py", line 99, in program final_response = get_response(args, config_dir=env.config.directory) File "/usr/local/lib/python3.6/site-packages/httpie/client.py", line 70, in get_response response = requests_session.request(**kwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 488, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.6/site-packages/hyper/contrib.py", line 78, in send request.headers File "/usr/local/lib/python3.6/site-packages/hyper/common/connection.py", line 121, in request method=method, url=url, body=body, headers=headers File "/usr/local/lib/python3.6/site-packages/hyper/http20/connection.py", line 281, in request self.endheaders(message_body=body, final=True, stream_id=stream_id) File "/usr/local/lib/python3.6/site-packages/hyper/http20/connection.py", line 555, in endheaders stream.send_headers(headers_only) File "/usr/local/lib/python3.6/site-packages/hyper/http20/stream.py", line 98, in send_headers conn.send_headers(self.stream_id, headers, end_stream) File "/usr/local/lib/python3.6/site-packages/h2/connection.py", line 813, in send_headers headers, self.encoder, end_stream File "/usr/local/lib/python3.6/site-packages/h2/stream.py", line 788, in send_headers headers, encoder, hf, hdr_validation_flags File "/usr/local/lib/python3.6/site-packages/h2/stream.py", line 1119, in _build_headers_frames encoded_headers = encoder.encode(headers) File "/usr/local/lib/python3.6/site-packages/hpack/hpack.py", line 229, in encode for header in headers: File "/usr/local/lib/python3.6/site-packages/h2/utilities.py", line 368, in _validate_host_authority_header for header in headers: File "/usr/local/lib/python3.6/site-packages/h2/utilities.py", line 302, in _reject_pseudo_header_fields for header in headers: File "/usr/local/lib/python3.6/site-packages/h2/utilities.py", line 274, in _reject_connection_header "Connection-specific header field present: %s." % header[0]h2.exceptions.ProtocolError: Connection-specific header field present: b'connection'.
HTTP/1.1 requests are unaffected even when httpie-http2 is installed, presumably because the plugin only does anything if you're actually trying to use HTTP/2, but all requests to HTTP/2 hosts become impossible.
The text was updated successfully, but these errors were encountered:
Yes, so I should note that the hyper library has not been a major focus for me recently, mostly because I'm working on a series of large and fairly important urllib3 changes. So there may be some issues around it.
This issue occurs both on the current stable HTTPie release, 0.9.9, and on the bleeding-edge development version
de38f86
installed usingpip3 install --upgrade https://github.com/jkbrzt/httpie/archive/master.tar.gz
.After installing
httpie-http2
withpip3 install httpie-http2
, every attempt to make an HTTP/2 request will fail, printing the error messagehttp: error: ProtocolError: Connection-specific header field present: b'connection'.
The full
--debug
output is:HTTP/1.1 requests are unaffected even when
httpie-http2
is installed, presumably because the plugin only does anything if you're actually trying to use HTTP/2, but all requests to HTTP/2 hosts become impossible.The text was updated successfully, but these errors were encountered: