Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netdev #3614

Closed
wants to merge 12 commits into from
Closed

Netdev #3614

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/net/tcpsock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does native (upstream) Go default to port 80 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, here's the doc for Addr in http.Server:

type Server struct {
	// Addr optionally specifies the TCP address for the server to listen on,
	// in the form "host:port". If empty, ":http" (port 80) is used.
	// The service names are defined in RFC 6335 and assigned by IANA.
	// See net.Dial for details of the address format.
	Addr string

}

// TINYGO: Use netdev resolver

host, sport, err := SplitHostPort(address)
Expand Down