def headers_url_generator(resp, fuzzable_req):
 resp_headers = resp.get_headers()
 for (parser, header_names) in URL_HEADERS.iteritems():
  for header_name in header_names:
   (header_value, _) = resp_headers.iget(header_name, None)
   if (header_value is not None):
    header_value = smart_unicode(header_value, encoding=resp.charset)
    for ref in parser(resp, header_name, header_value):
     (yield (ref, fuzzable_req, resp, False))

def headers_url_generator ( resp , fuzzable_req ) : resp_headers = resp . get_headers ( ) for ( parser , header_names ) in URL_HEADERS . iteritems ( ) : for header_name in header_names : ( header_value , _ ) = resp_headers . iget ( header_name , None ) if ( header_value is not None ) : header_value = smart_unicode ( header_value , encoding = resp . charset ) for ref in parser ( resp , header_name , header_value ) : ( yield ( ref , fuzzable_req , resp , False ) )
yields tuples containing: * newly found url * the fuzzablerequest instance passed as parameter * the httpresponse generated by the fuzzablerequest * boolean indicating if we trust this reference or not the newly found urls are extracted from the http response headers such as "location" .