net/url.URL.Host (field)
70 uses
net/url (current package)
url.go#L279: Host string // "host" or "host:port" (see Hostname and Port methods)
url.go#L491: url.User, url.Host, err = parseAuthority(url.Scheme, authority)
url.go#L804: if !u.OmitHost && (u.Scheme != "" || u.Host != "" || u.User != nil) {
url.go#L807: n += len(username) + len(password) + len(u.Host)
url.go#L822: if u.Scheme != "" || u.Host != "" || u.User != nil {
url.go#L823: if u.OmitHost && u.Host == "" && u.User == nil {
url.go#L826: if u.Host != "" || u.Path != "" || u.User != nil {
url.go#L833: if h := u.Host; h != "" {
url.go#L839: if path != "" && path[0] != '/' && u.Host != "" {
url.go#L1117: if ref.Scheme != "" || ref.Host != "" || ref.User != nil {
url.go#L1126: url.Host = ""
url.go#L1140: url.Host = ""
url.go#L1145: url.Host = u.Host
url.go#L1184: host, _ := splitHostPort(u.Host)
url.go#L1192: _, port := splitHostPort(u.Host)
net/http
client.go#L178: cookieURL.Host = req.Host
client.go#L656: if req.Host != "" && req.Host != req.URL.Host {
client.go#L688: if !stripSensitiveHeaders && reqs[0].URL.Host != req.URL.Host {
clientconn.go#L138: Host: host,
clientconn.go#L232: if req.URL.Host == "" {
csrf.go#L65: if u.Host == "" {
csrf.go#L161: if o, err := url.Parse(origin); err == nil && o.Host == req.Host {
h2_bundle.go#L7087: u.Host = w.rws.req.Host
h2_bundle.go#L7092: if u.Host == "" {
h2_bundle.go#L7213: Authority: msg.url.Host,
h2_bundle.go#L7892: addr := http2authorityAddr(req.URL.Scheme, req.URL.Host)
h2_bundle.go#L11028: http2encKV(enc, ":authority", w.url.Host)
request.go#L610: host = r.URL.Host
request.go#L911: u.Host = removeEmptyPort(u.Host)
request.go#L921: Host: u.Host,
request.go#L1149: req.Host = req.URL.Host
servemux121.go#L111: if u, ok := mux.redirectToPathSlash(r.URL.Host, r.URL.Path, r.URL); ok {
server.go#L2374: if u.Scheme == "" && u.Host == "" {
server.go#L2661: host := r.URL.Host
transport.go#L640: if req.URL.Host == "" {
net/http/httputil
dump.go#L249: host = req.URL.Host
reverseproxy.go#L343: req.URL.Host = target.Host
net/http/internal/httpcommon
httpcommon.go#L229: host = req.URL.Host
httpcommon.go#L599: url_ = &url.URL{Host: rp.Authority}
crypto/x509
constraints.go#L580: host := strings.ToLower(uri.Host)
constraints.go#L586: host, _, err = net.SplitHostPort(uri.Host)
constraints.go#L588: return nil, fmt.Errorf("cannot parse URI host %q: %v", uri.Host, err)
parser.go#L424: if len(uri.Host) > 0 && !domainNameValid(uri.Host, false) {
github.com/jackc/pgx/v5/pgconn
config.go#L561: for host := range strings.SplitSeq(parsedURL.Host, ",") {
golang.org/x/net/http2
server.go#L3090: u.Host = w.rws.req.Host
server.go#L3095: if u.Host == "" {
server.go#L3216: Authority: msg.url.Host,
transport.go#L586: addr := authorityAddr(req.URL.Scheme, req.URL.Host)
write.go#L285: encKV(enc, ":authority", w.url.Host)
golang.org/x/net/internal/httpcommon
request.go#L78: host = req.URL.Host
request.go#L448: url_ = &url.URL{Host: rp.Authority}
google.golang.org/grpc/internal/credentials
spiffe.go#L59: if len(uri.Host) == 0 || len(uri.Path) == 0 {
spiffe.go#L63: if len(uri.Host) > 255 {
google.golang.org/grpc/internal/resolver/delegatingresolver
delegatingresolver.go#L85: Host: address,
delegatingresolver.go#L161: url.Path = "/" + r.proxyURL.Host
delegatingresolver.go#L162: url.Host = "" // Clear the Host field to conform to the "dns:///" format
delegatingresolver.go#L217: Host: address.Addr,
delegatingresolver.go#L254: proxyAddr = resolver.Address{Addr: r.proxyURL.Host}
google.golang.org/grpc/internal/resolver/dns
dns_resolver.go#L144: d.resolver, err = internal.NewNetResolver(target.URL.Host)
google.golang.org/grpc/internal/resolver/unix
unix.go#L37: if target.URL.Host != "" {
unix.go#L38: return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.URL.Host)
google.golang.org/grpc/internal/transport
http_util.go#L462: addr = t.Host
proxy.go#L66: URL: &url.URL{Host: opts.ConnectAddr},
google.golang.org/grpc/resolver
resolver.go#L296: return t.URL.Scheme + "://" + t.URL.Host + "/" + t.Endpoint()
vendor/golang.org/x/net/http/httpproxy
proxy.go#L153: if err != nil || proxyURL.Scheme == "" || proxyURL.Host == "" {