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

com.dtflys.forest.http.ForestURL#getAuthority有一个判断条件觉得困惑 #187

Open
15800682975 opened this issue Jan 10, 2024 · 0 comments

Comments

@15800682975
Copy link

com.dtflys.forest.http.ForestURL#getAuthority
...
if (URLUtils.isNotNonePort(port) &&
((port != 80 && port != 443 && port > -1) ||
(port == 80 && !ssl) ||
(port == 443 && !ssl))) {
builder.append(':').append(port);
}
....
In this method, there is a if condition that I'm confused, from my knowledge, port 443 is for https , so why port == 443 && !ssl。
请原谅我的装x,我想问为啥443端口是非ssl的条件,是不是写错了

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

No branches or pull requests

1 participant