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
Is proxy hardcoded to return HTTP/1.1? #572
Comments
Hi Doug, you should be able to fix this by just changing the source code here: http.py#L1251-L1254. Cheers, |
Thanks for the fast response. I can certainly make an attempt to fork this repo and try to patch based on your recommendation and if it works submit a PR request. That being said, I'm a bit out of my element knowing how to get a build from my fork installed on the server in question. I've used 'pip' to install. Is it a matter of somehow configuring pip to point to the HEAD of my forked repo? Or is there some other way you would recommend? Thanks. |
Cheers, |
Any update on this? :-) |
Sorry for the delayed response. I appear to not be getting notified when there are entries to conversations I'm participating in. I was able to make a quick hack to hardcode the response to the http version I was expecting and got passed my problem. I have to follow up now and make a better fix. I'm somewhat delayed and its not helping that I'm very rusty in python to make a cleaner fix. |
Ok - I've submitted a pull request #584 |
Resolved in cdff79f |
We're attempting to use the proxy in a legacy java application and running into a problem. We've configured java to use a proxy pointing to mitmdump we've started. However, one of the calls is failing. This is apparently because we are using a library which attempts to make an HTTP/1.0 request to the proxy, but the mitmdump is returning "HTTP/1.1"
Here is the failure our application returns:
I tracked down the corresponding code for the library we are using:
Is there anything we can do via command line parameters or configuration of mitmdump which will ensure that HTTP 1.0 requests to the proxy will return v1.0 responses? That would be preferable at least in the short term rather than trying to get our application to use a new version of this code.
As additional background on this, we came across this when attempting to move our continuous integration build from a server running on OSX to a server running on Linux (RedHat7). The OSX build is not experiencing this problem (which is running mitmproxy 0.10.1). However, on RedHat7, we get the failure whether I run the latest (v0.11.x) or 0.10.1. I don't know much about origin of how the mitmproxy was installed on the OSX machine. Its a binary executable, where as the one I installed on our linux box was done through pip. The java code being run is that same as well as the java version on both platforms. I don't know enough about mitmproxy to know where the http protocol version is coming from. Maybe its a matter of changing the version of downstream python library dependency.
Thanks.
Doug
The text was updated successfully, but these errors were encountered: