HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyo
ó
Óµ Yc@sUdZddlZddlmZmZddlmZdejfd„ƒYZ	dS(s*The module containing HTTPProxyDigestAuth.iÿÿÿÿN(tcookiestutilsi(t_digest_auth_compattHTTPProxyDigestAuthcBskeZdZejddejƒZd„Zed„ƒZ	e	j
d„ƒZ	d„Zd„Zd„Z
RS(	sOHTTP digest authentication between proxy

    :param stale_rejects: The number of rejects indicate that:
        the client may wish to simply retry the request
        with a new encrypted response, without reprompting the user for a
        new username and password. i.e., retry build_digest_header
    :type stale_rejects: int
    sdigest tflagscOs0tt|ƒj||Žd|_|jƒdS(Ni(tsuperRt__init__t
stale_rejectstinit_per_thread_state(tselftargstkwargs((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyRs	cCs,t|ddƒ}|dkr%|jS|jS(Nt
_thread_local(tgetattrtNonet_stale_rejectsR(R	tthread_local((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyRscCs7t|ddƒ}|dkr*||_n	||_dS(NR(R
RRR(R	tvalueR((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyR"scCs/ytt|ƒjƒWntk
r*nXdS(N(RRRtAttributeError(R	((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyR*s
cKs¤|jdkrœ|jdkrœ|jjdƒ}|d
krKtdƒ‚n|jj|ƒsa|Stj	|jj
d|ddƒƒ|_d|jjkrÿd	|jkrÿ|jd	j
ƒd
krÔ|jd7_qÿ|jd	j
ƒdkrÿtdƒ‚qÿn|j|jƒ|jjƒ}tj|j|j|jƒ|j|jƒ|j|j|jƒ|jd<|jj||}|jj|ƒ||_|S|Sd
S(s’Handle HTTP 407 only once, otherwise give up

        :param r: current response
        :returns: responses, along with the new response
        i—isproxy-authenticatesRproxy server violated RFC 7235:407 response MUST contain header proxy-authenticatettcountisProxy-AuthorizationtstalettruetfalsesUser or password is invalidN(tstatus_codeRtheaderstgetRtIOErrort_pattmatchRtparse_dict_headertsubtchaltrequesttlowertcontenttclosetcopyRtextract_cookies_to_jart_cookiestrawtprepare_cookiestbuild_digest_headertmethodturlt
connectiontsendthistorytappend(R	trRts_authtprept_r((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyt
handle_4071s6!
	cCsL|jƒ|jr5|j|j|jƒ|jd<n|jd|jƒ|S(NsProxy-Authorizationtresponse(Rt
last_nonceR*R+R,Rt
register_hookR5(R	R1((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyt__call___s
	(t__name__t
__module__t__doc__tretcompilet
IGNORECASERRtpropertyRtsetterRR5R9(((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyR
s			.(
R<R=trequestsRRRRtauthtHTTPDigestAuthR(((sL/usr/lib/python2.7/site-packages/requests_toolbelt/auth/http_proxy_digest.pyt<module>s