httpie / httpie-http2

(DEPRECATED) Experimental HTTP/2 plugin for HTTPie
https://httpie.org
Other
68 stars 4 forks source link

It's not working at all with current hyper. #6

Closed urbaniak closed 8 years ago

urbaniak commented 8 years ago

Just after installing httpie-http2 it's not possible to make any request with the following error:

http: error: AttributeError: 'module' object has no attribute 'OP_NO_COMPRESSION'

Here's the versions:

httpie-http2==0.0.1
httplib2==0.9.2
hyper==0.5.0```
urbaniak commented 8 years ago

I've found that It's caused by old python version with outdated ssl module in OS X.

Closing.

sts commented 8 years ago

OSX currently ships Python 2.7.10. As per documentation, OP_NO_COMPRESSION should actually be supported in >= 2.7.9, still getting this error.

How did you solve this issue?

Lukasa commented 8 years ago

@sts OP_NO_COMPRESSION is not supported in OS X's system Python because Apple ships it linked against OpenSSL 0.9.8zh, which is ancient and does not support the OP_NO_COMPRESSION flag at all. OS X's system Python is simply entirely unsuitable for use with HTTP/2, unless you install a PyOpenSSL binary wheel.

urbaniak commented 8 years ago

@sts I've installed python from homebrew.

try2giveup commented 8 years ago

try this if not hasattr(ssl, 'OP_NO_COMPRESSION'): ssl.OP_NO_COMPRESSION = 131072