dromara / forest

A high-level and lightweight declarative HTTP client framework for Java. it makes sending HTTP requests in Java easier.
MIT License
1.71k stars 217 forks source link

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

Open 15800682975 opened 10 months ago

15800682975 commented 10 months ago

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