// varyMatches will return false unless all of the cached values for the headers listed in Vary
// match the new request
varyMatches will return false unless all of the cached values for the headers listed in Vary
match the new request
// varyMatches will return false unless all of the cached values for the headers listed in Vary // match the new request
func varyMatches(cachedResp *http.Response, req *http.Request) bool {
	for _, header := range headerAllCommaSepValues(cachedResp.Header, "vary") {
		header = http.CanonicalHeaderKey(header)
		if header != "" && req.Header.Get(header) != cachedResp.Header.Get("X-Varied-"+header) {
			return false
		}
	}
	return true
}
func varyMatches ( cachedResp * http . Response , req * http . Request ) bool { for _ , header := range headerAllCommaSepValues ( cachedResp . Header , " " ) { header = http . CanonicalHeaderKey ( header ) if header != " " && req . Header . Get ( header ) != cachedResp . Header . Get ( " " + header ) { return false } } return true }
varyMatches will return false unless all of the cached values for the headers listed in Vary
match the new request
varyMatches will return false unless all of the cached values for the headers listed in Vary match the new request