https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.7/site-packages/redhat_support_lib/system/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyo
�
f�Tc@sIdZddlZddlZddlZddlmZyddlmZWn!ek
rqddlmZnXddddd	d
ddd
dddddddddgZ	dZ
dZdZdZ
dZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Zd*Zd+Zd,Zd-Z d.Z!d/Z"d0Z#d1Z$d2Z%d3Z&d4Z'd5Z(d6Z)d7Z*d8Z+d9Z,d:Z-d;Z.d<Z/d=Z0d>Z1d?Z2d@Z3dAZ4dBZ5dCZ6dDZ7dEZ8dFZ9dGZ:dHZ;dIZ<dJZ=dKZ>dLZ?dMZ@i)dNd6dOd6dPd 6dQd!6dRd"6dSd#6dTd$6dUd%6dVd&6dWd)6dXd*6dYd+6dZd,6d[d-6d\d.6d]d^6d_d/6d`d06dad16dbd26dcd36ddd46ded56dfd66dgd76dhd86did96djd:6dkd;6dld<6dmd=6dnd>6dod?6dpd@6dqdA6drdF6dsdG6dtdH6dudI6dvdJ6dwdK6ZAdxZBdyejCfdz��YZDdfd{��YZEdfd|��YZFd}fd~��YZGdfd���YZHd�eHfd���YZId�eHfd���YZJdeFfd���YZKdfd���YZLeMed��rd�eLfd���YZNnd	eOfd���YZPd
ePfd���YZQdePfd���YZRdePfd���YZSdePfd���YZTd
ePfd���YZUdePfd���YZVdePfd���YZWdeWfd���YZXdeWfd���YZYdeWfd���YZZdePfd���YZ[ePZ\d�fd���YZ]d��Z^e_d�krEe^�ndS(�s�	HTTP/1.1 client library

<intro stuff goes here>
<other stuff, too>

HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:

    (null)
      |
      | HTTPConnection()
      v
    Idle
      |
      | putrequest()
      v
    Request-started
      |
      | ( putheader() )*  endheaders()
      v
    Request-sent
      |
      | response = getresponse()
      v
    Unread-response   [Response-headers-read]
      |\____________________
      |                     |
      | response.read()     | putrequest()
      v                     v
    Idle                  Req-started-unread-response
                     ______/|
                   /        |
   response.read() |        | ( putheader() )*  endheaders()
                   v        v
       Request-started    Req-sent-unread-response
                            |
                            | response.read()
                            v
                          Request-sent

This diagram presents the following rules:
  -- a second request may not be started until {response-headers-read}
  -- a response [object] cannot be retrieved until {request-sent}
  -- there is no differentiation between an unread response body and a
     partially read response body

Note: this enforcement is applied by the HTTPConnection class. The
      HTTPResponse class does not enforce this state machine, which
      implies sophisticated clients may accelerate the request/response
      pipeline. Caution should be taken, though: accelerating the states
      beyond the above pattern may imply knowledge of the server's
      connection-close behavior for certain requests. For example, it
      is impossible to tell whether the server will close the connection
      UNTIL the response headers have been read; this means that further
      requests cannot be placed into the pipeline until it is known that
      the server will NOT be closing the connection.

Logical State                  __state            __response
-------------                  -------            ----------
Idle                           _CS_IDLE           None
Request-started                _CS_REQ_STARTED    None
Request-sent                   _CS_REQ_SENT       None
Unread-response                _CS_IDLE           <response_class>
Req-started-unread-response    _CS_REQ_STARTED    <response_class>
Req-sent-unread-response       _CS_REQ_SENT       <response_class>
i����N(turlsplit(tStringIOtHTTPtHTTPResponsetHTTPConnectiontHTTPSConnectiont
HTTPExceptiontNotConnectedtUnknownProtocoltUnknownTransferEncodingtUnimplementedFileModetIncompleteReadt
InvalidURLtImproperConnectionStatetCannotSendRequesttCannotSendHeadertResponseNotReadyt
BadStatusLineterrort	responsesiPi�tUNKNOWNtIdlesRequest-startedsRequest-sentidieifi�i�i�i�i�i�i�i�i�i,i-i.i/i0i1i3i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�tContinuesSwitching ProtocolstOKtCreatedtAcceptedsNon-Authoritative Informations
No Contents
Reset ContentsPartial ContentsMultiple ChoicessMoved PermanentlytFounds	See OthersNot Modifieds	Use Proxys(Unused)i2sTemporary RedirectsBad RequesttUnauthorizedsPayment Requiredt	Forbiddens	Not FoundsMethod Not AllowedsNot AcceptablesProxy Authentication RequiredsRequest TimeouttConflicttGonesLength RequiredsPrecondition FailedsRequest Entity Too LargesRequest-URI Too LongsUnsupported Media TypesRequested Range Not SatisfiablesExpectation FailedsInternal Server ErrorsNot ImplementedsBad GatewaysService UnavailablesGateway TimeoutsHTTP Version Not SupporteditHTTPMessagecBs#eZd�Zd�Zd�ZRS(cCsT|jj|�}|dkr.||j|<n"dj||f�}||j|<dS(s*Add header for field key handling repeats.s, N(tdicttgettNonetjoin(tselftkeytvaluetprevtcombined((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt	addheader�s
cCs&|j|}|d||j|<dS(s-Add more field data from a continuation line.s
 N(R (R$R%tmoreR'((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytaddcontinue�s
cCs*i|_d|_g|_}d|_d}d}d}}}t|jd�rc|jj}n|jr{|jj	}nx�t
r%|r�y
|�}Wq�tk
r�d}}d|_q�Xn|jj�}|s�d|_Pn|r|j
d�r|j||_q~nd}|rS|ddkrS|j|�|j||j��q~n(|j|�rhq~n|j|�r{Pn|j|�}|r�|j|�|j||t|�dj��q~q~|js�d|_n	d	|_|r�||�n)|r|jj|�n|jd
|_Pq~WdS(s:Read header lines.

        Read header lines up to the entirely blank line that terminates them.
        The (normally blank) line that ends the headers is skipped, but not
        included in the returned list.  If a non-header line ends the headers,
        (which is an error), an attempt is made to backspace over it; it is
        never included in the returned list.

        The variable self.status is set to the empty string if all went well,
        otherwise it is an error message.  The variable self.headers is a
        completely uninterpreted list of lines contained in the header (so
        printing them will reproduce the header exactly as it appears in the
        file).

        If multiple header fields with the same name occur, they are combined
        according to the rules in RFC 2616 sec 4.2:

        Appending each subsequent field-value to the first, each separated
        by a comma. The order in which header fields with the same field-name
        are received is significant to the interpretation of the combined
        field value.
        titunreadisEOF in headerssFrom s 	s
No headerss%Non-header line where header expecteds
; bad seekN(R tunixfromtheaderststatusR"thasattrtfpR-tseekablettelltTruetIOErrortreadlinet
startswithtappendR+tstript	iscommenttislasttisheaderR)tlentseek(R$thlistt
headerseent	firstlinetstartoflineR-R4tline((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytreadheaders�s`		
			


	

$		
(t__name__t
__module__R)R+RE(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�s			cBszeZdddd�Zd�Zd�Zd�Zd�Zd�Zdd�Z	d�Z
d	�Zdd
�Zd�Z
RS(
icCs||jdd�|_||_||_||_d|_t|_t|_	t|_
t|_t|_t|_
t|_dS(Ntrbi(tmakefileR2t
debugleveltstrictt_methodR"tmsgt_UNKNOWNtversionR0treasontchunkedt
chunk_lefttlengtht
will_close(R$tsockRJRKtmethod((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt__init__Cs										cCse|jj�}|jdkr0dGt|�GHn|sEt|��ny|jdd�\}}}WnMtk
r�y"|jdd�\}}d}Wq�tk
r�d}q�XnX|jd�s|j	r�|j
�t|��qt||j�|_dSny7t|�}|d	ks(|d
kr7t|��nWntk
rWt|��nX|||fS(Nisreply:iiR,sHTTP/sHTTP/0.9i�idi�(sHTTP/0.9i�R,(
R2R7RJtreprRtsplitR"t
ValueErrorR8RKtclosetLineAndFileWrappertint(R$RDROR0RP((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_read_statusUs4


	

c
Cs�|jdk	rdSxvtr�|j�\}}}|tkrAPnxDtr�|jj�j�}|siPn|jdkrDdG|GHqDqDWqW||_	|j�|_
|dkr�d|_n?|jd�r�d|_n$|dkr�d|_nt
|��|jdkr;d|_d|_d	|_tt��|_dSt|jd�|_|jdkr�x|jjD]}dG|GqlWnd|j_|jjd
�}|r�|j�dkr�d	|_d|_n	d|_|j�|_|jjd�}|r9|jr9yt|�|_WqBtk
r5d|_qBXn	d|_|tks�|tks�d
|koqdkns�|jdkr�d|_n|jr�|jr�|jdkr�d	|_ndS(Nisheader:sHTTP/1.0i
sHTTP/1.isHTTP/0.9i	istransfer-encodingRQscontent-lengthidi�tHEAD(RMR"R5R^tCONTINUER2R7R:RJR0RPROR8RRSRQRTRRR/t	getheadertlowerRRt_check_closeR]RZt
NO_CONTENTtNOT_MODIFIEDRL(R$ROR0RPtskipthdrttr_encRS((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytbeginzsj								
	

cCs�|jjd�}|jdkrS|jjd�}|rOd|j�krOtStS|jjd�ritS|r�d|j�kr�tS|jjd�}|r�d|j�kr�tStS(Nt
connectioniR[s
keep-alivesproxy-connection(RMRaRORbR5tFalse(R$tconntpconn((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRc�scCs&|jr"|jj�d|_ndS(N(R2R[R"(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR[�s	
cCs
|jdkS(N(R2R"(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytisclosed�scCs�|jdkrdS|jr)|j|�S|dkr|jdkrV|jj�}n|j|j�}d|_|j�|S|jdk	r�||jkr�|j}q�n|jj|�}|jdk	r�|jt|�8_n|S(NR,i(	R2R"RQt
_read_chunkedRStreadt
_safe_readR[R>(R$tamtts((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRp�s$	
	
cCs�|j}d}x*tr;|dkr}|jj�}|jd�}|dkr[|| }nt|d�}|dkr}Pq}n|dkr�||j|�7}n�||kr�||j|�7}|||_|S||kr||j|�7}|jd�d|_|S||j|�7}||8}|jd�d}qWx3trq|jj�}|s^Pn|dkr?Pq?q?W|j�|S(NR,t;iiis
(	RRR5R"R2R7tfindR]RqR[(R$RrRRR&RDti((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRosD		


	


	
cCssg}x]|dkre|jjt|t��}|sEt|��n|j|�|t|�8}q	Wdj|�S(sVRead the number of bytes requested, compensating for partial reads.

        Normally, we have a blocking socket, but a read() can be interrupted
        by a signal (resulting in a partial read).

        Note that we cannot distinguish between EOF and an interrupt when zero
        bytes have been read. IncompleteRead() will be raised in this
        situation.

        This function should be used when <amt> bytes "should" be present for
        reading. If the bytes are truly not available (due to EOF), then the
        IncompleteRead exception can be used to detect the problem.
        iR,(R2Rptmint	MAXAMOUNTRR9R>R#(R$RrRstchunk((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRqJs
cCs.|jdkrt��n|jj||�S(N(RMR"RRa(R$tnametdefault((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRaascCs(|jdkrt��n|jj�S(s&Return list of (header, value) tuples.N(RMR"Rtitems(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt
getheadersfsN(RFRGR"RWR^RiRcR[RnRpRoRqRaR}(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR9s
	%	P				3	cBs�eZdZdZeZeZdZdZ	dZ
ddd�Zddd�Z
d�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zddd�Zd�Zd�Zdid�Zd�Zd�ZRS(isHTTP/1.1iicCstd|_g|_d|_t|_d|_d|_d|_d|_	|j
||�|dk	rp||_ndS(N(R"RUt_buffert_HTTPConnection__responset_CS_IDLEt_HTTPConnection__stateRLt_tunnel_hostt_tunnel_portt_tunnel_hdrst
_set_hostportRK(R$thosttportRK((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRWxs								cCs||_||_||_dS(N(R�R�R�(R$R�R�R/((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt
set_tunnel�s		cCs�|dkr�|jd�}|jd�}||kr�yt||d�}Wn)tk
rytd||d��nX|| }n	|j}|r�|ddkr�|ddkr�|dd!}q�n||_||_dS(Nt:t]isnonnumeric port: '%s'it[i����(R"trfindR]RZRtdefault_portR�R�(R$R�R�Rvtj((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s

	&	cCs
||_dS(N(RJ(R$tlevel((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytset_debuglevel�scCs|j|j|j�|jd|j|jf�x4|jj�D]#\}}|jd||f�qCW|jd�|j|j	d|j
d|j�}|j�\}}}|dkr�|j
�tjd||j�f�nx)tr|jj�}|dkr�Pq�q�WdS(NsCONNECT %s:%d HTTP/1.0
s%s: %s
s
RKRVi�sTunnel connection failed: %d %s(R�R�R�tsendR�R�R�t	iteritemstresponse_classRURKRLR^R[tsocketRR:R5R2R7(R$theaderR&tresponseROtcodetmessageRD((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_tunnel�s
$
	cCs2d}x�tj|j|jdtj�D]�}|\}}}}}yStj|||�|_|jdkr�d|j|jfGHn|jj|�Wnbtjk
r�}|jdkr�dG|j|jfGHn|jr�|jj	�nd|_q(nXPq(W|jstj|�n|jr.|j�ndS(s3Connect to the host and port specified in __init__.s!getaddrinfo returns an empty listisconnect: (%s, %s)s
connect fail:N(
R�tgetaddrinfoR�R�tSOCK_STREAMRURJtconnectRR[R"R�R�(R$RMtrestaftsocktypetprotot	canonnametsa((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s*				cCsQ|jr"|jj�d|_n|jrD|jj�d|_nt|_dS(s(Close the connection to the HTTP server.N(RUR[R"RR�R�(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR[�s	
	
cCs�|jdkr1|jr%|j�q1t��n|jdkrRdGt|�GHny|jj|�Wn6tj	k
r�}|ddkr�|j
�n�nXdS(sSend `str' to the server.issend:i N(RUR"t	auto_openR�RRJRXtsendallR�RR[(R$tstrtv((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s	

cCs|jj|�dS(suAdd a line of output to the current request buffer.

        Assumes that the line does *not* end with \r\n.
        N(R~R9(R$Rs((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_output�scCs:|jjd�dj|j�}|j2|j|�dS(spSend the currently buffered request and clear the buffer.

        Appends an extra \r\n to the buffer.
        R,s
N(R,R,(R~textendR#R�(R$RM((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_send_output�sc
Cs�|jr$|jj�r$d|_n|jtkr?t|_n	t��||_|s`d}nd|||jf}|j	|�|j
dkr�|s�d}|jd�r�t|�\}}}}}n|ry|j
d�}Wn tk
r|j
d�}nX|jd|�q�y|jj
d�}	Wn#tk
rU|jj
d�}	nX|jtkrx|jd|	�q�|jdd	|	|jf�n|s�|jd
d�q�ndS(
s`Send a request to the server.

        `method' specifies an HTTP request method, e.g. 'GET'.
        `url' specifies the object being requested, e.g. '/index.html'.
        `skip_host' if True does not add automatically a 'Host:' header
        `skip_accept_encoding' if True does not add automatically an
           'Accept-Encoding:' header
        t/s%s %s %siR,thttptasciitidnatHosts%s:%ssAccept-EncodingtidentityN(RRnR"R�R�t_CS_REQ_STARTEDRRLt
_http_vsn_strR�t	_http_vsnR8RtencodetUnicodeEncodeErrort	putheaderR�R�t	HTTP_PORT(
R$RVturlt	skip_hosttskip_accept_encodingR�tnetloctnilt
netloc_encthost_enc((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt
putrequest�s>			


 
cCs<|jtkrt��nd||f}|j|�dS(skSend a request header line to the server.

        For example: h.putheader('Accept', 'text/html')
        s%s: %sN(R�R�RR�(R$R�R&R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�dscCs2|jtkrt|_n	t��|j�dS(s?Indicate that the last header line has been sent to the server.N(R�R�t_CS_REQ_SENTRR�(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt
endheadersos	cCsmy|j||||�WnLtjk
rh}|ddksI|jrO�n|j||||�nXdS(s&Send a complete request to the server.ii N(t
_send_requestR�RR�(R$RVR�tbodyR/R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytrequestysc
Cs�tjg|D]}|j�^q
�}i}d|krGd|d<nd|kr`d|d<n|j|||�|r�d|kr�|jdtt|���nx*|j�D]\}}	|j||	�q�W|j�|r�|j	|�ndS(NR�iR�saccept-encodingR�scontent-lengthsContent-Length(
R tfromkeysRbR�R�R�R>R�R�R�(
R$RVR�R�R/tktheader_namestskipsRgR&((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s(


c	Cs�|jr$|jj�r$d|_n|jtks<|jrHt��n|jdkr�|j|j|jd|j	d|j
�}n$|j|jd|j	d|j
�}|j�t|_|j
r�|j�n	||_|S(s!Get the response from the server.iRKRVN(RRnR"R�R�RRJR�RURKRLRiR�RTR[(R$R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytgetresponse�s 	
		
	N(RFRGR�R�RR�R�R�R�RJRKR"RWR�R�R�R�R�R[R�R�R�R�R�R�R�R�R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRms.					
			
k		
	tSharedSocketcBs,eZd�Zd�Zd�Zd�ZRS(cCs||_d|_dS(Ni(RUt_refcnt(R$RU((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW�s	cCs|jd7_dS(Ni(R�(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytincref�scCs2|jd8_|jdkr.|jj�ndS(Nii(R�RUR[(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytdecref�scCs|jj�dS(N(RUR[(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt__del__�s(RFRGRWR�R�R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s			tSharedSocketClientcBseZd�Zd�ZRS(cCs/d|_||_|jj�|j|_dS(Ni(t_closedt_sharedR�RUt_sock(R$tshared((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW�s		
cCs/|js+|jj�d|_d|_ndS(Ni(R�R�R�R"(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR[�s	
	(RFRGRWR[(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s	tSSLFilecBseeZdZdZdd�Zd�Zdd�Zd�Zdd�Z	d�Z
d	�Zd
�ZRS(s(File-like object wrapping an SSL socket.i cCs;tj||�||_d|_|p1|jj|_dS(NR,(R�RWt_sslt_buft	__class__tBUFSIZEt_bufsize(R$RUtssltbufsize((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW�s		cCs�d}x�tr�y|jj|j�}Wn�tjk
r�}|dtjks	|dtjkriq	n|dtjks�|dtj	kr�Pn�q	tj
k
r�}|dtjkr�q	n|dtj
kr�Pn�q	XPq	W|S(NR,i(R5R�RpR�R�tsslerrortSSL_ERROR_WANT_READtSSL_ERROR_WANT_WRITEtSSL_ERROR_ZERO_RETURNt
SSL_ERROR_EOFRterrnotEINTRtEBADF(R$tbufterr((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_reads(	cCs�|jg}t|j�}xU|dks6||krr|j�}|dkrRPn|j|�|t|�7}qWdj|�}|dkr�d|_|S|||_|| SdS(NR,(R�R>R"R�R9R#(R$tsizetLtavailRstall((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRps
	
cCs�|jg}d|_xO|djd�}|dkr;Pn|j�}|dkrWPn|j|�q|dkr�dj|�Sdj|�}|jd�d}|| }|||_|SdS(NR,i����s
ii(R�RuR�R9R#(R$R�RvRsR�RD((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR7+s"	


icCsfd}g}xStra|j�}|s+Pn|j|�|t|�7}|r||krPqqW|S(Ni(R5R7R9R>(R$tsizehintttotaltlistRD((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt	readlinesAs	
cCs
|jj�S(N(R�tfileno(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�NscCs|S(N((R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt__iter__QscCs|j�}|st�n|S(N(R7t
StopIteration(R$RD((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytnextTs	N(
RFRGt__doc__R�R"RWR�RpR7R�R�R�R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s		
		t
FakeSocketcBsceZdd
d��YZd�Zd�Zdd�Zdd�ZeZddd�Z	d	�Z
RS(t
_closedsocketcBseZd�ZRS(cCstdd��dS(Ni	sBad file descriptor(R(R$Rz((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt__getattr__]s(RFRGR�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�\scCs)t|�}tj||�||_dS(N(R�R�RWR�(R$RUR�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW`scCs#tj|�|jj�|_dS(N(R�R[R�R�R�(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR[es
cCs:|dkr$|dkr$t��nt|j|j|�S(NtrRH(R
R�R�R�(R$tmodeR�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRIisicCs|jj|�S(N(R�twrite(R$tstufftflags((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�nsicCs|jj|�S(N(R�Rp(R$R>R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytrecvsscCst|j|�S(N(tgetattrR�(R$tattr((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�vs(N(RFRGR�RWR[R"RIR�R�R�R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�Zs		cBs2eZdZeZddddd�Zd�ZRS(s(This class allows communication via SSL.cCs,tj||||�||_||_dS(N(RRWtkey_filet	cert_file(R$R�R�R�R�RK((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRWs	cCs�tjtjtj�}|j|j|jf�|jrP||_|j�ntj	||j
|j�}t||�|_dS(s(Connect to a host on a given (SSL) port.N(
R�tAF_INETR�R�R�R�R�RUR�R�R�R�R�(R$RUR�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��s		
N(RFRGR�t
HTTPS_PORTR�R"RWR�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRzs
	cBsteZdZdZdZdZeZdddd�Z	d�Z
ddd�Zd�Zd	�Z
d
�Zd�ZRS(
s-Compatibility class with httplib.py from 1.5.i
sHTTP/1.0iR,cCs5|dkrd}n|j|j|||��dS(s:Provide a default host, since the superclass requires one.iN(R"t_setupt_connection_class(R$R�R�RK((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW�s	cCs^||_|j|_|j|_|j|_|j|_|j|_|j|_d|_dS(N(	t_connR�R�R�R�R�R�R"tfile(R$Rl((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�s	cCs3|dk	r"|jj||�n|jj�dS(sDAccept arguments to set the host/port, since the superclass doesn't.N(R"RR�R�(R$R�R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��scCs|jS(sCProvide a getfile, since the superclass' does not use this concept.(R(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytgetfile�scGs |jj|dj|��dS(s.The superclass allows only one value argument.s
	N(RR�R#(R$R�tvalues((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR��scCs�y|jj�}WnNtk
rc}|jjjdd�|_|j�d|_d|j	dfSX|j
|_|j|_|j|j
|j
fS(sCompat definition since superclass does not define it.

        Returns a tuple consisting of:
        - server status code (e.g. '200' if all goes well)
        - server "reason" corresponding to status code
        - any RFC822 headers in the response from the server
        RHii����N(RR�RRURIRR[R"R/RDRMR2R0RP(R$R�te((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pytgetreply�s
	cCs|jj�d|_dS(N(RR[R"R(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR[�s
N(RFRGR�R�R�RJRRR"RWRR�RR�R	R[(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�s				R�tHTTPScBs,eZdZeZdddddd�ZRS(s�Compatibility with 1.5 httplib interface

        Python 1.5.2 did not have an HTTPS class, but it defined an
        interface for sending http requests that is also useful for
        https.
        R,cCsM|dkrd}n|j|j|||||��||_||_dS(Ni(R"RRR�R�(R$R�R�R�R�RK((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW�s	
	N(RFRGR�RRR"RW(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR
�scBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRscBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRscBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRscBseZd�ZRS(cCs|f|_||_dS(N(targsRO(R$RO((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRWs(RFRGRW(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRscBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR	scBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR
scBseZd�ZRS(cCs|f|_||_dS(N(Rtpartial(R$R((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRWs(RFRGRW(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRscBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR
!scBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR$scBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR'scBseZRS((RFRG(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR*scBseZd�ZRS(cCs|f|_||_dS(N(RRD(R$RD((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW.s(RFRGRW(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR-sR\cBsJeZdZd�Zd�Zd�Zdd�Zd�Zdd�Z	RS(s2A limited file-like object for HTTP/0.9 responses.cCs7||_||_d|_d|_t|�|_dS(Ni(t_linet_filet_line_consumedt_line_offsetR>t
_line_left(R$RDR((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRW=s
				cCst|j|�S(N(R�R(R$R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�DscCs:d|_|jj|_|jj|_|jj|_dS(Ni(RRRpR7R�(R$((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt_doneGs	cCs�|jr|jj|�S|dks4||jkr�|j|j}|j�|dkrk||jj�S||jj|t|��Sn[|j}||}|j||!}||_|j|8_|jdkr�|j�n|SdS(Ni(	RRRpR"RR
RRR>(R$RrRsRvR�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyRpPs 	
!	
	
cCs4|jr|jj�S|j|j}|j�|S(N(RRR7R
RR(R$Rs((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR7fs
	

cCsk|jr|jj|�S|j|jg}|j�|dkrS||jj�S||jj|�SdS(N(RRR�R
RRR"(R$R�R�((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�ns	
N(
RFRGR�RWR�RR"RpR7R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR\5s					cCs�ddl}ddl}|j|jdd�\}}d}x-|D]%\}}|dkrD|d}qDqDWd}d}|dr�|d}n|dr�|d}nt�}	|	j|�|	j|�|	jd	|�|	j�|	j�\}
}}d
G|
GHdG|GHdGt	|	j
�j��GHH|rOx|jD]}
|
j
�GHq7WnHd
tfd��Y}|d�}	|	jd	d�|	j�|	j�|	j�ttd�r�x�dD]�\}}d||fGHt�}|j|�|j|�|jd	|�|j�|j�\}
}}d
G|
GHdG|GHdGt	|j
�j��GHH|ryx|jD]}
|
j
�GHqaWnHq�WndS(s�Test this module.

    A hodge podge of tests collected here, because they have too many
    external dependencies for the regular test suite.
    i����Nitdis-dswww.python.orgR�tGETsstatus =sreason =RptHTTP11cBseZdZdZRS(isHTTP/1.1(RFRGR�R�(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyR�sshttp://www.python.org/~jeremy/R�ssourceforge.nets/projects/pythonshttps://%s%s(ssourceforge.nets/projects/python((ssourceforge.nets/projects/python(tsystgetopttargvRR�R�R�R�R	R>RRpR/R:R[R1R�R
(RRtoptsRtdltotaR�tselectorthR0RPR/R�Rths((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyttestysd



	


		


	


		t__main__(`R�R�t	mimetoolsR�turlparseRt	cStringIORtImportErrort__all__R�RRNR�R�R�R`tSWITCHING_PROTOCOLSt
PROCESSINGRtCREATEDtACCEPTEDtNON_AUTHORITATIVE_INFORMATIONRdt
RESET_CONTENTtPARTIAL_CONTENTtMULTI_STATUStIM_USEDtMULTIPLE_CHOICEStMOVED_PERMANENTLYtFOUNDt	SEE_OTHERRet	USE_PROXYtTEMPORARY_REDIRECTtBAD_REQUESTtUNAUTHORIZEDtPAYMENT_REQUIREDt	FORBIDDENt	NOT_FOUNDtMETHOD_NOT_ALLOWEDtNOT_ACCEPTABLEtPROXY_AUTHENTICATION_REQUIREDtREQUEST_TIMEOUTtCONFLICTtGONEtLENGTH_REQUIREDtPRECONDITION_FAILEDtREQUEST_ENTITY_TOO_LARGEtREQUEST_URI_TOO_LONGtUNSUPPORTED_MEDIA_TYPEtREQUESTED_RANGE_NOT_SATISFIABLEtEXPECTATION_FAILEDtUNPROCESSABLE_ENTITYtLOCKEDtFAILED_DEPENDENCYtUPGRADE_REQUIREDtINTERNAL_SERVER_ERRORtNOT_IMPLEMENTEDtBAD_GATEWAYtSERVICE_UNAVAILABLEtGATEWAY_TIMEOUTtHTTP_VERSION_NOT_SUPPORTEDtINSUFFICIENT_STORAGEtNOT_EXTENDEDRRxtMessageRRRR�R�R�R�RRR1R
t	ExceptionRRRRR	R
RR
RRRRRR\R RF(((sE/usr/lib/python2.7/site-packages/redhat_support_lib/system/httplib.pyt<module>Cs
			
i�5�jd YD	=

https://t.me/AnonymousX5 - 2025