-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asks throwing errors on certain TLS enabled connections that requests doesn't #136
Comments
The Invalid HTTP Response stack trace, which i can't easily reproduce because I'm not able to copy/paste from the machine, shows an error in response_obj from asks/request_object.py
|
The SSLEOFERROR traceback (handtyped so there are maybe a couple of typos) is below. paths are slightly redacted.
|
The SSLEOFERROR seems to have been fixed by updating to asks 2.3.5 (conda-forge still has an older version). now i'm able to pull pages from this site successfully. Everything is working, except requesting anything from the REST API causes asks to crash with invalid http response errors. The content-type of responses from the REST API are text/plain; charset utf-8, and according to my proxy server the response code when request from my browser is a 200 with no intervening redirects. Working Not working The only thing im modifying between requests is the URL. Error is the above referenced Invalid HTTP reseponse error related to h11. Considering the server's response is plaintext, the error is surprising. |
Sorry for the delays around here, I'm swamped IRL at the moment. I'm going to need to take some time to dig in to this and that other odd issue. I agree, this is surprising. Thanks for the write up :) |
Results are as follows (I'm unable to find information on how to proxy the traffic from asks to inspect decrypted contents of the HTTPS traffic to give further details).
Wireshark appears to indicate the TLS handshake was successful because application layer data appears in the PCAP after the handshake traffic, but that data is encrypted.
Note: h11 is mentioned in the traceback for the Invalid HTTP Response error I'm getting -- unsure whether it's related to /issues/107
Asks Library
SSLEOFERROR: << fixed by using pip to install latest version of asks (conda-forge is behind)
asks.get('https://IntranetResource', auth=BasicAuth(usr_pw))
Invalid HTTP Response Error:
asks.get('https://IntranetResource/rest/api/path',auth=BasicAuth(usr_pw))
Body of page is returned as expected:
asks.get('https://google.com')
Requests Library
Body of page is returned as expected:
requests.get('https://url', auth=HTTPBasicAuth=(usr_pw),verify=False)
Proper response returned from API as expected:
requests.get('https://url/rest/api/path', auth=HTTPBasicAuth=(usr_pw),verify=False)
The text was updated successfully, but these errors were encountered: