def extract_link_from_link_header(http_response, header_name, header_value):
 re_match = LINK_HEADER_RE.search(header_value)
 if re_match:
  try:
   url_str = re_match.group(1)
  except IndexError:
   raise StopIteration
  if (not url_str):
   raise StopIteration
  try:
   (yield http_response.get_url().url_join(url_str))
  except ValueError:
   msg = 'The application sent a "%s" header that w3af failed to correctly parse as an URL, the header value was: "%s"'
   om.out.debug((msg % (header_name, header_value)))

def extract_link_from_link_header ( http_response , header_name , header_value ) : re_match = LINK_HEADER_RE . search ( header_value ) if re_match : try : url_str = re_match . group ( 1 ) except IndexError : raise StopIteration if ( not url_str ) : raise StopIteration try : ( yield http_response . get_url ( ) . url_join ( url_str ) ) except ValueError : msg = 'The application sent a "%s" header that w3af failed to correctly parse as an URL, the header value was: "%s"' om . out . debug ( ( msg % ( header_name , header_value ) ) )
extract links from http response headers which have the header value set to a "wordpress link" example headers we can parse: link: <URL rel=shortlink .