dromara / dromara/forest

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

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

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的条件,是不是写错了

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.