Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for HeaderValuesContainsToken (0.36 sec)

  1. pkg/h2c/wrapper.go

    			_, _ = w.Write([]byte("h2c upgrade not allowed"))
    			return
    		}
    		h.ServeHTTP(w, r)
    	})
    }
    
    func isH2CUpgrade(h http.Header) bool {
    	return httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Upgrade")], "h2c") &&
    		httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Connection")], "HTTP2-Settings")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 09 08:02:48 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/http/httpguts/httplex.go

    	'z':  true,
    	'|':  true,
    	'~':  true,
    }
    
    func IsTokenRune(r rune) bool {
    	return r < utf8.RuneSelf && isTokenTable[byte(r)]
    }
    
    // HeaderValuesContainsToken reports whether any string in values
    // contains the provided token, ASCII case-insensitively.
    func HeaderValuesContainsToken(values []string, token string) bool {
    	for _, v := range values {
    		if headerValueContainsToken(v, token) {
    			return true
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top