mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-23 05:07:50 +08:00
ignore placeholder port
This commit is contained in:
parent
5bec227935
commit
a3035ba977
@ -392,9 +392,8 @@ func SplitNetworkAddress(a string) (network, host, port string, err error) {
|
||||
if err != nil {
|
||||
// in general, if there was an error, it was likely "missing port",
|
||||
// so try adding a bogus port to take advantage of standard library's
|
||||
// robust parser, then strip the artificial port.
|
||||
host, port, err = net.SplitHostPort(net.JoinHostPort(a, "0"))
|
||||
port = ""
|
||||
// robust parser.
|
||||
host, _, err = net.SplitHostPort(net.JoinHostPort(a, "0"))
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user