Skip to content
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

refactor: remove check #5106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

yeikel
Copy link
Contributor

@yeikel yeikel commented Feb 7, 2024

No description provided.

@@ -431,7 +431,7 @@ private HttpClientRequest createRequest(
if (!ABS_URI_START_PATTERN.matcher(u).find()) {
int defaultPort = 80;
String addPort = (authority.port() != -1 && authority.port() != defaultPort) ? (":" + authority.port()) : "";
u = (useSSL == Boolean.TRUE ? "https://" : "http://") + authority.host() + addPort + requestURI;
u = "http://" + authority.host() + addPort + requestURI;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not needed because in line 430, we're checking !useSSL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vietj Do you know what was the intention of this line?

@@ -182,7 +182,7 @@ private EndpointProvider<EndpointKey, SharedClientHttpStreamEndpoint> httpEndpoi
ProxyOptions proxyOptions = key.proxyOptions;
if (proxyOptions != null && !key.ssl && proxyOptions.getType() == ProxyType.HTTP) {
SocketAddress server = SocketAddress.inetSocketAddress(proxyOptions.getPort(), proxyOptions.getHost());
key = new EndpointKey(key.ssl, key.sslOptions, proxyOptions, server, key.authority);
key = new EndpointKey(false, key.sslOptions, proxyOptions, server, key.authority);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is more explicit than key.ssl , and we are negating it in line 183

@yeikel yeikel marked this pull request as ready for review February 7, 2024 02:33
@vietj
Copy link
Member

vietj commented May 21, 2024

can you rebase on latest master there is a conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants