-
Notifications
You must be signed in to change notification settings - Fork 1.6k
NettyAsyncHttpProvider returns 404 for HTTPS URLs when behind proxy #251
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
Milestone
Comments
Thanks! |
Sure! |
I agree with your proposal and will push it right now. |
According to the code, Grizzly provider is impacted as well. if (useProxy) {
if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) {
secure = false;
httpCtx.establishingTunnel = true;
builder.method(Method.CONNECT);
builder.uri(AsyncHttpProviderUtils.getAuthority(uri));
} else {
builder.uri(uri.toString());
}
} else {
builder.uri(uri.getPath());
} |
Rollbacking, see #236 |
slandelle
pushed a commit
that referenced
this issue
Mar 14, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a request is made to a HTTPS URL and AsyncHttpClient is configured to use proxy, the request results in 404 error.
What happens is AsyncHttpClient first issues a CONNECT request to the proxy (line 570):
And then makes a regular HTTP request via the established secure channel, but the following condition at line 600 makes it use full URL as a path although the request is sent directly to the server this time:
Some websites seem to work around invalid requests in their own (like google.com), others do not. The issue is reproducible on wi-fi.org.
Here's the diff that fixes it:
I can submit a pull request, however it seems to somewhat intersect with the one for issue #202.
The text was updated successfully, but these errors were encountered: