[
https://issues.apache.org/jira/browse/HTTPCLIENT-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706969#comment-17706969
]
Oleg Kalnichevski edited comment on HTTPCLIENT-2267 at 3/30/23 4:59 PM:
------------------------------------------------------------------------
[~patrickjamesbarry] You can find them all here:
https://github.com/apache/httpcomponents-client
Oleg
was (Author: olegk):
[~patrickjamesbarry] You can find them all here:
[https://github.com/apache/httpcomponents-client|https://github.com/apache/httpcomponents-core/]
Oleg
> Connect called before Interceptors are invoked
> ----------------------------------------------
>
> Key: HTTPCLIENT-2267
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2267
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.2.1
> Reporter: Patrick Barry
> Priority: Major
>
> We tried to migrated to 5.2.1 from 5.1.4. Right away, our unit tests showed
> us that our HttpRequestInterceptor that was registered
> "addRequestInterceptorFirst" is not called before a connection is attempted
> to be established. Expected behaviour is that our interceptor validation
> would catch malformed urls, etc and kick out a known error to us. Now,
> NoRouteToHostException is being thrown before our interceptor logic is hit.
> The 'bad url' we were using in our test is:
> [https://google.com:555|https://google.com:555/]
>
> To recreate, standup new HttpAsyncClient, register an interceptor in first
> position and force it to use HTTP 1.1, and then generate a GET request to
> [https://google.com:555|https://google.com:555/]
>
> {code:java}
> java.net.NoRouteToHostException: No route to host
> at java.base/sun.nio.ch.Net.connect0(Native Method)
> at java.base/sun.nio.ch.Net.connect(Net.java:579)
> at java.base/sun.nio.ch.Net.connect(Net.java:586)
> at
> java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:853)
> at
> org.apache.hc.core5.reactor.SingleCoreIOReactor.lambda$processConnectionRequest$0(SingleCoreIOReactor.java:336)
> at
> java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
> at
> org.apache.hc.core5.reactor.SingleCoreIOReactor.processConnectionRequest(SingleCoreIOReactor.java:335)
> at
> org.apache.hc.core5.reactor.SingleCoreIOReactor.processPendingConnectionRequests(SingleCoreIOReactor.java:307)
> at
> org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:138)
> at
> org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86)
> at
> org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
> at java.base/java.lang.Thread.run(Thread.java:833) {code}
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]