def has_vary_header(response, header_query):
 if (not response.has_header(u'Vary')):
  return False
 vary_headers = cc_delim_re.split(response[u'Vary'])
 existing_headers = set([header.lower() for header in vary_headers])
 return (header_query.lower() in existing_headers)

def has_vary_header ( response , header_query ) : if ( not response . has_header ( u'Vary' ) ) : return False vary_headers = cc_delim_re . split ( response [ u'Vary' ] ) existing_headers = set ( [ header . lower ( ) for header in vary_headers ] ) return ( header_query . lower ( ) in existing_headers )
checks to see if the response has a given header name in its vary header .