mirror of
https://github.com/tinygo-org/net.git
synced 2026-07-26 08:18:39 +00:00
BUG Fix: use port :80 if server.Addr is empty
This commit is contained in:
committed by
deadprogram
parent
7898c5e946
commit
d939a800a7
@@ -88,6 +88,11 @@ func ResolveTCPAddr(network, address string) (*TCPAddr, error) {
|
||||
return nil, fmt.Errorf("Network '%s' not supported", network)
|
||||
}
|
||||
|
||||
switch address {
|
||||
case ":http":
|
||||
address = ":80"
|
||||
}
|
||||
|
||||
// TINYGO: Use netdev resolver
|
||||
|
||||
host, sport, err := SplitHostPort(address)
|
||||
|
||||
Reference in New Issue
Block a user