
    #h$                         d Z ddlZddlZ ej                  e      Z ej                          ej                  j                  dddg dd      Z	 ej                  dd	e	d
      Zh dZdedefdZy)z-
Functions devoted to requests over the WWW.
    N   F)i  i  i  i  i  i  i  i  i	  i
  i  i  i  i  i  i  iV     )totalredirectraise_on_redirectstatus_forcelistbackoff_factor	CERT_NONEd   
   )	cert_reqs	num_poolsretriestimeout>
   ,  -  .  /  0  1  2  3  4     urlreturnc                 H   	 t         j                  d|       }|j                  t        v r?t        j                  d|j                         |j                         |j                         S t        d|        # t        $ r!}t        j                  d| |       Y d}~3d}~ww xY w)zTest final URL to handle redirects
    Args:
        url: url to check

    Returns:
        The final URL seen.

    Raises:
        Nothing.
    HEADzresult found: %s %szunknown error: %s %sNzcannot reach URL: $)
	HTTP_POOLrequeststatusACCEPTABLE_CODESLOGGERdebuggeturl	Exception	exception
ValueError)r   rheaderrs      L/var/www/html/sandstorm/venv/lib/python3.12/site-packages/courlan/network.pyredirection_testr,   /   s    "!!&#.
 <<++LL.M<<>!
*3%0
11  ;/c::;s   A7 7	B! BB!)__doc__loggingurllib3	getLogger__name__r#   disable_warningsutilRetryRETRY_STRATEGYPoolManagerr   r"   strr,        r+   <module>r:      s      
		8	$     ##
& / $ 2  GS."	 F 2# 2# 2r9   