+
    i                         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                   P   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
httpsc                   < \         \        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.
\N)
superr   __init__authurlrawusersplitupperdomainuserpw)selfr   r   r   argskwargs
user_parts	__class__s   &&&&*, k/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.pyr   NTLMConnectionPool.__init__"   sX     	 $0$A&AZZa(
 m))+qM	    c                   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# )   z3Starting NTLM HTTPS connection no. %d: https://%s%s
Connection
Keep-AliveAuthorizationzwww-authenticate)hostportzNTLM %szRequest headers: %sGETNzResponse status: %s %szResponse headers: %szResponse data: %s [...]z, :N   NzNTLM :r%   NNzUnexpected z response header: :Nd   Ni  z3Server rejected request: wrong username or passwordzWrong server response:  zConnection established)num_connectionslogdebugr"   r   r   r#   r   create_NTLM_NEGOTIATE_MESSAGEr   requestgetresponsedictheadersstatusreasonreadfpr   	Exceptionparse_NTLM_CHALLENGE_MESSAGE create_NTLM_AUTHENTICATE_MESSAGEr   r   r   )r   r/   
req_headerresp_headerconnresreshdrauth_header_valuesauth_header_valuesServerChallengeNegotiateFlagsauth_msgs   &            r   	_new_conn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           	     F   < Vf   / pRVR&   \         \        V `  WW4WVV4      # )Nr    r   )r   r   urlopen)	r   methodurlbodyr/   retriesredirectassert_same_hostr   s	   &&&&&&&&r   rE   NTLMConnectionPool.urlopens   s8     ?G ,'6;K
 	
r   )r   r   r   r   r   )NN   TT)__name__
__module____qualname____firstlineno____doc__schemer   rB   rE   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s'      FAF
 
r   r   )rR   
__future__r   warningsloggingr   r    r   packages.six.moves.http_clientr   warnDeprecationWarningrN   r)   r    r   r   <module>r`      sP   
 '    " < N  g
, g
r   