-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow AhcEndpoint address override in grizzly provider #1122
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
Conversation
ProxyServer proxyServer) { | ||
return request.getConnectionPoolPartitioning() | ||
.getPartitionKey(request.getUri(), proxyServer).toString(); | ||
return overrideAddress != null ? overrideAddress.toString() + "_" : "" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it supposed to be
(overrideAddress != null ? overrideAddress.toString() + "_" : "") +
request.getConnectionPoolPartitioning()
.getPartitionKey(request.getUri(), proxyServer).toString();
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks for pointing out. Fixed it.
First, before going into reviewing the implementation (I'll leave this for @oleksiys as this is on the Grizzly side), there's a very important step! You didn't describe the purpose of your proposed change!!! What is this for? Is it a bug? A new feature? |
7e16499
to
2fd3a70
Compare
@slandelle Thanks, i just edited the first comment in the PR. |
@slandelle can we ignore that integration failure? not sure if it's related to the change at all. |
@oleksiys Yes, you can ignore Travis on 1.9. Travis is enabled globally on the repo but there's no yaml file in 1.9 as tests would fail anyway (some old tests are localized and only work outside NA, where Travis hosts are of course based). |
thank you! |
@slandelle |
I juste released 1.9.37 |
thank you! |
Thanks to both of you. |
Add usage of Request#getInetAddress() in grizzly provider.
This allows for overriding the address where the physical connection is established, by setting it in the request instead of letting the provider use the host from the url or the proxy.
Netty is already doing this (https://github.com/AsyncHttpClient/async-http-client/blob/1.9.x/src/main/java/com/ning/http/client/providers/netty/request/NettyRequestSender.java#L354) among with other name resolution stuff, and it is a feature i am needing in grizzly provider.