- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for ValidHostHeader (0.12 sec)
-
src/vendor/golang.org/x/net/http/httpguts/httplex.go
if len(v) == 0 { return false } for i := 0; i < len(v); i++ { if !isTokenTable[v[i]] { return false } } return true } // ValidHostHeader reports whether h is a valid host header. func ValidHostHeader(h string) bool { // The latest spec is actually this: // // http://tools.ietf.org/html/rfc7230#section-5.4 // Host = uri-host [ ":" port ] // // Where uri-host is:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 8.7K bytes - Viewed (0) -
src/net/http/request.go
// header or request smuggling via the Host field. // The server can (and will, if it's a net/http server) reject // the request if it doesn't consider the host valid. if !httpguts.ValidHostHeader(host) { // Historically, we would truncate the Host header after '/' or ' '. // Some users have relied on this truncation to convert a network // address such as Unix domain socket path into a valid, ignored
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 49.4K bytes - Viewed (0) -
src/net/http/server.go
if req.ProtoAtLeast(1, 1) && (!haveHost || len(hosts) == 0) && !isH2Upgrade && req.Method != "CONNECT" { return nil, badRequestError("missing required Host header") } if len(hosts) == 1 && !httpguts.ValidHostHeader(hosts[0]) { return nil, badRequestError("malformed Host header") } for k, vv := range req.Header { if !httpguts.ValidHeaderFieldName(k) { return nil, badRequestError("invalid header name") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
src/net/http/h2_bundle.go
} host := req.Host if host == "" { host = req.URL.Host } host, err := httpguts.PunycodeHostPort(host) if err != nil { return nil, err } if !httpguts.ValidHostHeader(host) { return nil, errors.New("http2: invalid Host header") } var path string if req.Method != "CONNECT" { path = req.URL.RequestURI() if !http2validPseudoPath(path) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0)