def provides_cors_features(freq, url_opener):
 response = url_opener.GET(freq.get_url())
 ac_value = retrieve_cors_header(response, ACCESS_CONTROL_ALLOW_ORIGIN)
 if (ac_value is not None):
  return True
 headers = Headers({'Origin': 'www.w3af.org'}.items())
 response = url_opener.GET(freq.get_url(), headers=headers)
 ac_value = retrieve_cors_header(response, ACCESS_CONTROL_ALLOW_ORIGIN)
 if (ac_value is not None):
  return True
 return False

def provides_cors_features ( freq , url_opener ) : response = url_opener . GET ( freq . get_url ( ) ) ac_value = retrieve_cors_header ( response , ACCESS_CONTROL_ALLOW_ORIGIN ) if ( ac_value is not None ) : return True headers = Headers ( { 'Origin' : 'www.w3af.org' } . items ( ) ) response = url_opener . GET ( freq . get_url ( ) , headers = headers ) ac_value = retrieve_cors_header ( response , ACCESS_CONTROL_ALLOW_ORIGIN ) if ( ac_value is not None ) : return True return False
method to detect if url provides cors features .