This commit is contained in:
2020-11-17 18:44:17 +08:00
parent efe2143a53
commit 7a6ca96ac3
+6 -2
View File
@@ -412,6 +412,12 @@ abstract class ClientAbstracts extends Component implements IClient
*/
public function getPort(): int
{
if ($this->isSSL()) {
return 443;
}
if (empty($this->port)) {
return 80;
}
return $this->port;
}
@@ -741,9 +747,7 @@ abstract class ClientAbstracts extends Component implements IClient
private function defaultString($string)
{
$host = $this->getHost();
if (!empty($this->port) && $this->port != 443) {
$host .= ':' . $this->getPort();
}
if ($string == '/') {
$string = '';
} else if (strpos($string, '/') !== 0) {