bpitman commented on PR #421:
URL:
https://github.com/apache/httpcomponents-core/pull/421#issuecomment-1694006616
Messing around with client examples. The target ends up wrong if HttpHost
is part of the request object, but works if passed in directly to
client.execute() - as you suggested earlier. I have not yet found anything
that works using HttpHost through requester (directly using core5).
Using targets:
1) new HttpHost("https", "upload-test.domain.com", 443) # load balancer
2) new HttpHost("https", InetAddress.getByName("192.168.30.10"),
"dummy.domain.com", 8443)
3) new HttpHost("https", InetAddress.getByName("192.168.30.10"),
"upload-test.domain.com", 8443)
4) new HttpHost("https", InetAddress.getByName("192.168.30.10"),
"my-upload-test.domain.com", 8443) // resolves to .11
AsyncClientHttpExchangeStreaming.java (uses core5 BasicRequestBuilder):
1) works correctly
2) UnkonwnHostException - incorrectly attempting resolution of dummy hostname
3) Connection refused/timeout - incorrectly resolves to load balancer and
can't connect to 8443
4) incorrectly resolves to .11 and completes the request with wrong endpoint
AsyncClientHttpExchange.java (uses client5 SimpleRequestBuilder):
1) works correctly
2) UnkonwnHostException - incorrectly attempting resolution of dummy hostname
3) Connection refused/timeout - incorrectly resolves to load balancer and
can't connect to 8443
4) incorrectly resolves to .11 and completes the request with wrong endpoint
Using the client.execute(target, ...):
1) works correctly
2) works correctly
3) works correctly
4) works correctly
I don't understand the rationale behind the logical layers that explains why
this is the intended outcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]