+
     h  c                   s    R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^RIHt ^RI	H
t
 ]P                  ! R]4       ]! ]4      t ! R R	]4      tR# )
z
NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
)absolute_importN)	getLogger)ntlm)HTTPSConnectionPool)HTTPSConnectiona#  The 'urllib3.contrib.ntlmpool' module is deprecated and will be removed in urllib3 v2.0 release, urllib3 is not able to support it properly due to reasons listed in issue: https://github.com/urllib3/urllib3/issues/2282. If you are a user of this module please comment in the mentioned issue.c                   sP   a a ] tR t^t oRtRtV 3R ltR tRV 3R lltRt	Vt
V ;t# )NTLMConnectionPoolzI
Implements an NTLM authentication version of an urllib3 connection pool
Zhttpsc                s   < \         \        V `
  ! V/ VB  W0n        Wn        VP                  R^4      pV^ ,          P                  4       V n        V^,          V n        W n	        R# )z
authurl is a random URL on the server that is protected by NTLM.
user is the Windows user, probably in the DOMAIN\username format.
pw is the password for the user.
Z\N)
superr   __init__authurlrawusersplitZupperdomainuserpw)selfr   r   r   ZargsZkwargsZ
user_parts	__class__s   &&&&*, I/usr/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyr   ZNTLMConnectionPool.__init__"   sX     	 $0$A&AZZa(
 m))+qM	    c                s   V ;P                   ^,          un         \        P                  RV P                   V P                  V P                  4       RR/pRpRp\        V P                  V P                  R7      pR\        P                  ! V P                  4      ,          W&   \        P                  RV4       VP                  R	V P                  R
V4       VP                  4       p\        VP                  4      p\        P                  RVP                  VP                  4       \        P                  RV4       \        P                  RVP!                  ^d4      4       R
Vn        Wc,          P%                  R4      pR
pV F  p	V	R,          R8X  g   K  V	R,          pK  	  Vf   \'        RV: RWc,          : 24      h\        P(                  ! V4      w  r\        P*                  ! WP,                  V P.                  V P0                  V4      pRV,          W&   \        P                  RV4       VP                  R	V P                  R
V4       VP                  4       p\        P                  RVP                  VP                  4       \        P                  R\        VP                  4      4       \        P                  RVP!                  4       R,          4       VP                  ^8w  dD   VP                  R8X  d   \'        R4      h\'        RVP                  : RVP                  : 24      hR
Vn        \        P                  R4       V# )i   z3Starting NTLM HTTPS connection no. %d: https://%s%s
Connection
Keep-AliveZAuthorizationzwww-authenticate)hostportzNTLM %szRequest headers: %sZGETNzResponse status: %s %szResponse headers: %szResponse data: %s [...]z, :N   NzNTLM :r   NNzUnexpected z response header: :Nid   Ni  z3Server rejected request: wrong username or passwordzWrong server response: Z zConnection established)Znum_connectionslogZdebugr   r   r   r   r   Zcreate_NTLM_NEGOTIATE_MESSAGEr	   ZrequestZgetresponseZdictheadersZstatusZreasonZreadZfpr
   Z	ExceptionZparse_NTLM_CHALLENGE_MESSAGEZ create_NTLM_AUTHENTICATE_MESSAGEr   r   r   )r   r   Z
req_headerZresp_headerZconnZresZreshdrZauth_header_valuesZauth_header_valueZsZServerChallengeZNegotiateFlagsZauth_msgs   &            r   	_new_connZNTLMConnectionPool._new_conn0   s    	!		A  IILL		
  .$
(DIIDII> ($*L*LLL+
 
 			'1UDLL$8 ckk"		*CJJ

C		(&1		+SXXc];  $066t< #Au$%bE! $ $7BFDWX 
 +/*K*K+
' 88YYTWWn
 ((2		'1UDLL$8 		*CJJ

C		($s{{*;<		+SXXZ-=>::zzS  UVVcjj#**UVV		*+r   c           	     sF   < Vf   / pRVR&   \         \        V `  WW4WVV4      # )Nr   r   )r   r   urlopen)	r   ZmethodZurlZbodyr   ZretriesZredirectZassert_same_hostr   s	   &&&&&&&&r   r   ZNTLMConnectionPool.urlopens   s8     ?G ,'6;K
 	
r   )r   r   r   r	   r   )NNi   TT)__name__Z
__module__Z__qualname__Z__firstlineno____doc__Zschemer   r   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   r   r      s'      FAF
 
r   r   )r   Z
__future__r    ZwarningsZloggingr   r   Z r   Zpackages.six.moves.http_clientr   ZwarnZDeprecationWarningr   r   r   ) r   r   <module>r      sP   
 '    " < N  g
, g
r   