HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/http/__pycache__/client.cpython-35.pyc


Fa+@sidZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZdddddd	d
ddd
ddddddddgZdZ
dZdZdZdZdZejejjddejjjDZdZdZd Zejd!jZejd"jZ ejd#Z!ejd$Z"d%d&d'hZ#d(d)d*Z$Gd+d,d,ej%j&Z'd-d.Z(e'd/d0Z)Gd1ddej*Z+Gd2ddZ,yddl-Z-Wne.k
rYn$XGd3d4d4e,Z/ej0d4Gd5dde1Z2Gd6dde2Z3Gd7dde2Z4Gd8dde2Z5Gd9d	d	e2Z6Gd:d
d
e2Z7Gd;dde2Z8Gd<d
d
e2Z9Gd=dde9Z:Gd>dde9Z;Gd?dde9Z<Gd@dde2Z=GdAdde2Z>GdBdde?e=Z@e2ZAdS)Ca
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
      |\_____________________________
      |                              | getresponse() raises
      | response = getresponse()     | ConnectionError
      v                              v
    Unread-response                Idle
    [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>
N)urlsplitHTTPResponseHTTPConnection
HTTPExceptionNotConnectedUnknownProtocolUnknownTransferEncodingUnimplementedFileModeIncompleteRead
InvalidURLImproperConnectionStateCannotSendRequestCannotSendHeaderResponseNotReady
BadStatusLineLineTooLongRemoteDisconnectederror	responsesPiZUNKNOWNZIdlezRequest-startedzRequest-sentcCsi|]}|j|qS)phrase).0vrr!/usr/lib/python3.5/http/client.py
<dictcomp>ks	riids[^:\s][^:\r\n]*s\n(?![ \t])|\r(?![ \t\n])z[- ]z[-]ZPATCHZPOSTZPUTdatacCsy|jdSWnotk
r}zOt|j|j|j|jd|j||j|j|fdWYdd}~XnXdS)z<Call data.encode("latin-1") but show a better error message.zlatin-1z`%s (%.20r) is not valid Latin-1. Use %s.encode('utf-8') if you want to send it encoded in UTF-8.N)encodeUnicodeEncodeErrorencodingobjectstartendtitle)rnameerrrrr_encodesr'c@seZdZddZdS)HTTPMessagecCs|jd}t|}g}d}xh|jD]Z}|d|j|kr`d}n|ddjs|d}|r5|j|q5W|S)aFind all header lines matching a given header name.

        Look through the list of headers and find all lines matching a given
        header name (and their continuation lines).  A list of the lines is
        returned, without interpretation.  If the header does not occur, an
        empty list is returned.  If the header occurs multiple times, all
        occurrences are returned.  Case is not important in the header name.

        :rN)lowerlenkeysisspaceappend)selfr%nZlstZhitlinerrrgetallmatchingheaderss
	z!HTTPMessage.getallmatchingheadersN)__name__
__module____qualname__r3rrrrr(sr(cCs~g}xq|jtd}t|tkr:td|j|t|tkritdt|dkr	Pq	W|S)zReads potential header lines into a list from a file pointer.

    Length of line is limited by _MAXLINE, and number of
    headers is limited by _MAXHEADERS.
    r*zheader linezgot more than %d headers

)r7r8r9)readline_MAXLINEr,rr/_MAXHEADERSr)fpheadersr2rrr
_read_headerss
r?cCs@t|}dj|jd}tjjd|j|S)aGParses only RFC2822 headers from a file pointer.

    email Parser wants to see strings rather than bytes.
    But a TextIOWrapper around self.rfile would buffer too many bytes
    from the stream, bytes which we later need to read as bytes.
    So we read the correct bytes here, as bytes, for email Parser
    to parse.

    r9z
iso-8859-1_class)r?joindecodeemailparserZParserZparsestr)r=r@r>Zhstringrrr
parse_headerss
rEcseZdZdddddZddZddZd	d
ZddZfd
dZfddZ	ddZ
ddZdddZddZ
ddZddZddZdd Zd!d"Zd#d$Zd%d&Zd@d(d)ZdAd*d+ZdBfd,d-Zd.d/Zd0d1Zd2d3Zdd4d5Zd6d7Zd8d9Zd:d;Zd<d=Zd>d?Z S)CrrNcCsw|jd|_||_||_d|_|_t|_t|_t|_	t|_
t|_t|_t|_
dS)Nrb)Zmakefiler=
debuglevel_methodr>msg_UNKNOWNversionstatusreasonchunked
chunk_leftlength
will_close)r0sockrGmethodurlrrr__init__s								zHTTPResponse.__init__cCsit|jjtdd}t|tkr=td|jdkr_tdt||sqt	dy|j
dd\}}}WnOtk
ry"|j
dd\}}d}Wntk
rd}YnXYnX|jd	s|j
t|y4t|}|d
ks.|dkr:t|Wntk
r[t|YnX|||fS)Nr*z
iso-8859-1zstatus linerzreply:z-Remote end closed connection without responsezHTTP/ri)strr=r:r;r,rrGprintreprrsplit
ValueError
startswith_close_connrint)r0r2rKrLrMrrr_read_statuss2




zHTTPResponse._read_statuscCs||jdk	rdSxT|j\}}}|tkr8Pt|j}|jdkrctd|~qW||_|_|j	|_
|dkrd|_n'|jdrd|_nt
|t|j|_|_|jdkrx$|jD]}td|d	d
qW|jjd}|rV|jdkrVd
|_d|_n	d|_|j|_d|_|jjd}|jjd}|r|jryt||_Wntk
rd|_YqX|jdkrd|_n	d|_|tksC|tksCd|ko/dknsC|jdkrLd|_|jrx|jrx|jdkrxd
|_dS)Nrzheaders:HTTP/1.0HTTP/0.9
zHTTP/1.zheader:r# ztransfer-encodingrNTFzcontent-lengthrHEAD)rarb)r>r`ZCONTINUEr?r=rGrYcoderLstriprMrKr]rrErIgetr+rNrO_check_closerQrPr_r\Z
NO_CONTENTZNOT_MODIFIEDrH)r0rKrLrMZskipped_headershdrZtr_encrPrrrbegin9s\
			
		

zHTTPResponse.begincCs|jjd}|jdkrS|jjd}|rOd|jkrOdSdS|jjdridS|rd|jkrdS|jjd}|rd|jkrdSdS)NZ
connectionrdcloseTFz
keep-alivezproxy-connection)r>rjrKr+)r0ZconnZpconnrrrrkszHTTPResponse._check_closecCs |j}d|_|jdS)N)r=rn)r0r=rrrr^s		zHTTPResponse._close_connc
s,ztjWd|jr'|jXdS)N)superrnr=r^)r0)	__class__rrrns	zHTTPResponse.closecs'tj|jr#|jjdS)N)roflushr=)r0)rprrrqs
	zHTTPResponse.flushcCsdS)NTr)r0rrrreadableszHTTPResponse.readablecCs
|jdkS)z!True if the connection is closed.N)r=)r0rrrisclosedszHTTPResponse.isclosedcCs|jdkrdS|jdkr0|jdS|dk	rqt|}|j|}t|d|jS|jr|jS|j	dkr|jj
}nAy|j|j	}Wntk
r|jYnXd|_	|j|SdS)Nr9rgr)
r=rHr^	bytearrayreadinto
memoryviewtobytesrN_readall_chunkedrPread
_safe_readr
)r0amtbr1srrrrys*
	


	
zHTTPResponse.readcCs|jdkrdS|jdkr0|jdS|jrF|j|S|jdk	rt||jkrt|d|j}|jj|}|r|r|jn1|jdk	r|j|8_|js|j|S)Nrrg)	r=rHr^rN_readinto_chunkedrPr,rvru)r0r|r1rrrrus$
	


	
zHTTPResponse.readintocCs|jjtd}t|tkr4td|jd}|dkr_|d|}yt|dSWntk
r|jYnXdS)Nr*z
chunk size;r)	r=r:r;r,rfindr_r\r^)r0r2irrr_read_next_chunk_sizes

z"HTTPResponse._read_next_chunk_sizecCsSxL|jjtd}t|tkr7td|s>P|dkrPqWdS)Nr*ztrailer line

r9)rrr9)r=r:r;r,r)r0r2rrr_read_and_discard_trailersz&HTTPResponse._read_and_discard_trailercCs|j}|s|dk	r(|jdy|j}Wntk
rXtdYnX|dkr|j|jd}||_|S)NrVr9r)rOrzrr\r
rr^)r0rOrrr_get_chunk_left#s	



	zHTTPResponse._get_chunk_leftcCs|jtkstg}yPx<|j}|dkr:P|j|j|d|_q!Wdj|SWn'tk
rtdj|YnXdS)Nrr9)	rNrJAssertionErrorrr/rzrOrAr
)r0valuerOrrrrx;s

zHTTPResponse._readall_chunkedcCs|jtkstd}t|}yx|j}|dkrI|St||kr|j|}|||_||S|d|}|j|}||d}||7}d|_q-WWn.tk
rtt	|d|YnXdS)Nr)
rNrJrrvrr,_safe_readintorOr
bytes)r0r|total_bytesmvbrOr1temp_mvbrrrr~Is&


zHTTPResponse._readinto_chunkedcCs|g}xf|dkrn|jjt|t}|sNtdj|||j||t|8}q	Wdj|S)aVRead 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.
        rr9)r=rymin	MAXAMOUNTr
rAr/r,)r0r{r}chunkrrrrzas
zHTTPResponse._safe_readcCsd}t|}x|t|krtt|kr^|dt}|jj|}n|jj|}|stt|d|t|||d}||7}qW|S)z2Same as _safe_read, but for reading into a buffer.rN)rvr,rr=rur
r)r0r|rrrr1rrrrxs%zHTTPResponse._safe_readintor*cCs|jdks|jdkr"dS|jr8|j|S|jdk	rk|dksb||jkrk|j}y|jj|}Wn3tk
r|dkr|jjd}YnX|r|r|jn$|jdk	r|jt|8_|S)zvRead with at most one underlying system call.  If at least one
        byte is buffered, return that instead.
        Nrgr9rrii@)	r=rHrN_read1_chunkedrPread1r\r^r,)r0r1resultrrrrs"	
*	


zHTTPResponse.read1cCsH|jdks|jdkr"dS|jr8|j|S|jj|S)Nrgr9)r=rHrN
_peek_chunkedpeek)r0r1rrrrs
	
zHTTPResponse.peekcs|jdks|jdkr"dS|jr;tj|S|jdk	rn|dkse||jkrn|j}|jj|}|r|r|jn$|jdk	r|jt|8_|S)Nrgr9r)r=rHrNror:rPr^r,)r0limitr)rprrr:s	*	

zHTTPResponse.readlinecCs|j}|dks$|dkr(dSd|ko?|knsJ|}|jj|}|jt|8_|std|S)Nrr9)rr=rrOr,r
)r0r1rOryrrrrszHTTPResponse._read1_chunkedcCsSy|j}Wntk
r(dSYnX|dkr9dS|jj|d|S)Nr9)rr
r=r)r0r1rOrrrrs
	zHTTPResponse._peek_chunkedcCs
|jjS)N)r=fileno)r0rrrrszHTTPResponse.filenocCsd|jdkrt|jj|p-|}t|tsOt|drS|Sdj|SdS)N__iter__z, )r>rZget_all
isinstancerXhasattrrA)r0r%defaultr>rrr	getheaders	zHTTPResponse.getheadercCs+|jdkrtt|jjS)z&Return list of (header, value) tuples.N)r>rlistitems)r0rrr
getheaderss	zHTTPResponse.getheaderscCs|S)Nr)r0rrrrszHTTPResponse.__iter__cCs|jS)N)r>)r0rrrinfoszHTTPResponse.infocCs|jS)N)rT)r0rrrgeturlszHTTPResponse.geturlcCs|jS)N)rL)r0rrrgetcodeszHTTPResponse.getcoderr)!r4r5r6rUr`rmrkr^rnrqrrrsryrurrrrxr~rzrrrr:rrrrrrrrrrr)rprrs<	!K
 	
	c@sTeZdZdZdZeZeZdZ	dZ
dejdddZ
dddd	Zd
dZdd
ZddZddZddZddZddZdddZddddZddZdd Zd!d"Zd#d$Zd%d&Zdd'd(Zdid)d*Zd+d,Zd-d.Z d/d0Z!dS)1rrdzHTTP/1.1r*rNcCs||_||_d|_g|_d|_t|_d|_d|_d|_	i|_
|j||\|_|_
|j|jtj|_dS)N)timeoutsource_addressrR_buffer_HTTPConnection__response_CS_IDLE_HTTPConnection__staterH_tunnel_host_tunnel_port_tunnel_headers
_get_hostporthostport_validate_hostsocketZcreate_connection_create_connection)r0rrrrrrrrUs										zHTTPConnection.__init__cCsV|jrtd|j||\|_|_|rE||_n
|jjdS)aDSet up host and port for HTTP CONNECT tunnelling.

        In a connection that uses HTTP CONNECT tunneling, the host passed to the
        constructor is used as a proxy server that relays all communication to
        the endpoint passed to `set_tunnel`. This done by sending an HTTP
        CONNECT request to the proxy server when the connection is established.

        This method must be called before the HTML connection has been
        established.

        The headers argument should be a mapping of extra HTTP headers to send
        with the CONNECT request.
        z.Can't set up tunnel for established connectionN)rRRuntimeErrorrrrrclear)r0rrr>rrr
set_tunnels	zHTTPConnection.set_tunnelcCs	|dkr|jd}|jd}||kryt||dd}WnVtk
r||dddkr|j}ntd||ddYnX|d|}n	|j}|r|ddkr|ddkr|dd	}||fS)
Nr)]r*rWznonnumeric port: '%s'r[rr)rfindr_r\default_portr)r0rrrjrrrr+s
#	&zHTTPConnection._get_hostportcCs
||_dS)N)rG)r0levelrrrset_debuglevel?szHTTPConnection.set_debuglevelcCshd|j|jf}|jd}|j|xI|jjD]8\}}d||f}|jd}|j|qBW|jd|j|jd|j}|j	\}}	}
|	t
jjkr|j
td|	|
jfxn|jjtd}t|tkr*td	|s1P|dkr>P|jdkrtd
|jqWdS)NzCONNECT %s:%d HTTP/1.0
asciiz%s: %s
zlatin-1
rSzTunnel connection failed: %d %sr*zheader line
r9rzheader:)rrr9)rrrsendrrresponse_classrRrHr`http
HTTPStatusZOKrnOSErrorrir=r:r;r,rrGrYrB)r0Zconnect_strZ
connect_bytesheaderrZ
header_strZheader_bytesresponserKrhmessager2rrr_tunnelBs2	



	zHTTPConnection._tunnelcCs]|j|j|jf|j|j|_|jjtjtj	d|j
rY|jdS)z3Connect to the host and port specified in __init__.r*N)rrrrrrRZ
setsockoptrZIPPROTO_TCPZTCP_NODELAYrr)r0rrrconnectas
$	zHTTPConnection.connectcCsYt|_z&|j}|r.d|_|jWd|j}|rTd|_|jXdS)z(Close the connection to the HTTP server.N)rrrRrnr)r0rRrrrrrnjs					zHTTPConnection.closecCs|jdkr.|jr%|jn	t|jdkrPtdt|d}t|dr|jdkr~tdd}y
|j}Wnt	k
rYn,Xd|krd	}|jdkrtd
x?|j
|}|sP|r|jd}|jj|qWdSy|jj|Wn^t
k
rt|tjrqx7|D]}|jj|qTWnt
dt|YnXdS)
zSend `data' to the server.
        ``data`` can be a string object, a bytes object, an array object, a
        file-like object that supports a .read() method, or an iterable object.
        Nrzsend:i ryzsendIng a read()ableFr|Tzencoding file using iso-8859-1z
iso-8859-1z9data should be a bytes-like object or an iterable, got %r)rR	auto_openrrrGrYrZrmodeAttributeErrorryrZsendall	TypeErrorrcollectionsIterabletype)r0rZ	blocksizerrZ	datablockdrrrrxsF	
	





zHTTPConnection.sendcCs|jj|dS)zuAdd a line of output to the current request buffer.

        Assumes that the line does *not* end with \r\n.
        N)rr/)r0r}rrr_outputszHTTPConnection._outputcCs\|jjddj|j}|jdd=|j||dk	rX|j|dS)zSend the currently buffered request and clear the buffer.

        Appends an extra \r\n to the buffer.
        A message_body may be specified, to be appended to the request.
        r9s
N)r9r9)rextendrAr)r0message_bodyrIrrr_send_outputs
zHTTPConnection._send_outputFc
Cs-|jr!|jjr!d|_|jtkr<t|_nt|j|j|||_|pjd}|j|d|||j	f}|j
|j||jdkr)|sd}|j
drt|\}}}}}|r;y|jd}Wn!tk
r'|jd}YnX|jd	|n|jrY|j}	|j}
n|j}	|j}
y|	jd}Wn!tk
r|	jd}YnX|	jd
dkrd|d
}|
|jkr|jd	|n)|jd}|jd	d||
f|s)|jddndS)a`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
        N/z%s %s %srdrWrrZidnaZHostr)r[]z%s:%szAccept-EncodingZidentity)rrsrr_CS_REQ_STARTEDr
_validate_methodrH_validate_path
_http_vsn_strr_encode_request	_http_vsnr]rrr	putheaderrrrrrrrB)r0rSrT	skip_hostskip_accept_encodingrequestZnetlocZnilZ
netloc_encrrZhost_encrrr
putrequestsP	
	

				

zHTTPConnection.putrequestcCs
|jdS)Nr)r)r0rrrrr<szHTTPConnection._encode_requestcCs5tj|}|r1td||jfdS)z&Validate a method name for putrequest.z?method can't contain control characters. %r (found at least %r)N)$_contains_disallowed_method_pchar_researchr\group)r0rSmatchrrrr@s
zHTTPConnection._validate_methodcCsCtj|}|r?djd|jt}t|dS)zValidate a url for putrequest.zJURL can't contain control characters. {url!r} (found at least {matched!r})matchedN)!_contains_disallowed_url_pchar_rerformatrlocalsr)r0rTrrIrrrrJs
	zHTTPConnection._validate_pathcCsCtj|}|r?djd|jd|}t|dS)z9Validate a host so it doesn't contain control characters.zKURL can't contain control characters. {host!r} (found at least {matched!r})rrN)rrrrr)r0rrrIrrrrUs
	zHTTPConnection._validate_hostcGs |jtkrtt|dr6|jd}t|sUtd|ft|}xt|D]\}}t|dr|jd||<n(t	|t
rt|jd||<t||rntd||fqnWdj
|}|d|}|j|dS)	zkSend a request header line to the server.

        For example: h.putheader('Accept', 'text/html')
        rrzInvalid header name %rzlatin-1zInvalid header value %rs
	s: N)rrrrr_is_legal_header_namer\r	enumeraterr_rX_is_illegal_header_valuerAr)r0rvaluesrZ	one_valuerrrrr`s"	zHTTPConnection.putheadercCs5|jtkrt|_n	t|j|dS)aIndicate that the last header line has been sent to the server.

        This method sends the request to the server.  The optional message_body
        argument can be used to pass a message body associated with the
        request.  The message body will be sent in the same packet as the
        message headers if it is a string, otherwise it is sent as a separate
        packet.
        N)rr_CS_REQ_SENTrr)r0rrrr
endheaders|s		zHTTPConnection.endheaderscCs|j||||dS)z&Send a complete request to the server.N)
_send_request)r0rSrTbodyr>rrrrszHTTPConnection.requestcCsd}|jtk}|dkr3|r3d}n|dk	rytt|}Wnhtk
ry"ttj|jj}Wn1t	t
fk
r|jdkrtdYnXYnX|dk	r|j
d|dS)N0rz
Cannot stat!!zContent-Length)upper_METHODS_EXPECTING_BODYrXr,rosfstatrst_sizerrrGrYr)r0rrSZthelenZmethod_expects_bodyrrr_set_content_lengths	
"z"HTTPConnection._set_content_lengthc	Cstjdd|D}i}d|kr8d|d<d|krNd|d<|j|||d|kr}|j||x*|jD]\}}|j||qWt|trt|d	}|j	|dS)
NcSsg|]}|jqSr)r+)rkrrr
<listcomp>s	z0HTTPConnection._send_request.<locals>.<listcomp>rr*rzaccept-encodingrzcontent-lengthr)
dictfromkeysrrrrrrXr'r)	r0rSrTrr>Zheader_namesZskipsrlrrrrrs

zHTTPConnection._send_requestcCs'|jr!|jjr!d|_|jtks9|jrHt|j|jdkr{|j|j|jd|j}n|j|jd|j}yuy|j	Wnt
k
r|jYnX|jt
kstt|_|jr|jn	||_|SWn|jYnXdS)a)Get the response from the server.

        If the HTTPConnection is in the correct state, returns an
        instance of HTTPResponse or of whatever object is returned by
        the response_class variable.

        If a request has not been sent or if a previous response has
        not be handled, ResponseNotReady is raised.  If the HTTP
        response indicates that the connection should be closed, then
        it will be closed before the response is returned.  When the
        connection is closed, the underlying socket is closed.
        NrrS)rrsrrrrGrrRrHrmConnectionErrorrnrQrJrr)r0rrrrgetresponses.	

		
	
zHTTPConnection.getresponse)"r4r5r6rrrr	HTTP_PORTrrrGr_GLOBAL_DEFAULT_TIMEOUTrUrrrrrrnrrrrrrrrrrrrrrrrrrrs:		0~
cs^eZdZdZeZdddejdddddfddZfddZ	S)	HTTPSConnectionz(This class allows communication via SSL.Ncontextcheck_hostnamec
stt|j||||||_||_|dkrItj}|jtjk}	|dkrp|j	}|r|	rt
d|s|r|j||||_||_
dS)NzMcheck_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED)rorrUkey_file	cert_filesslZ_create_default_https_contextZverify_modeZ	CERT_NONErr\Zload_cert_chain_context_check_hostname)
r0rrrrrrrrZwill_verify)rprrrUs			
	zHTTPSConnection.__init__cstj|jr"|j}n	|j}|jj|jd||_|jjr|jryt	j
|jj|Wn5tk
r|jj
tj|jjYnXdS)z(Connect to a host on a given (SSL) port.server_hostnameN)rorrrr
Zwrap_socketrRrrr	Zmatch_hostnameZgetpeercert	ExceptionZshutdownrZ	SHUT_RDWRrn)r0r)rprrrs
		

zHTTPSConnection.connect)
r4r5r6__doc__
HTTPS_PORTrrrrUrrr)rprrs	rc@seZdZdS)rN)r4r5r6rrrrr2sc@seZdZdS)rN)r4r5r6rrrrr7sc@seZdZdS)rN)r4r5r6rrrrr:sc@seZdZddZdS)rcCs|f|_||_dS)N)argsrK)r0rKrrrrU>szUnknownProtocol.__init__N)r4r5r6rUrrrrr=sc@seZdZdS)rN)r4r5r6rrrrrBsc@seZdZdS)r	N)r4r5r6rrrrr	Esc@s7eZdZdddZddZddZdS)r
NcCs"|f|_||_||_dS)N)rpartialexpected)r0rrrrrrUIs	zIncompleteRead.__init__cCsE|jdk	rd|j}nd}d|jjt|j|fS)Nz, %i more expectedrWz%s(%i bytes read%s))rrpr4r,r)r0errr__repr__Ms
zIncompleteRead.__repr__cCs
t|S)N)rZ)r0rrr__str__TszIncompleteRead.__str__)r4r5r6rUrrrrrrr
Hsc@seZdZdS)rN)r4r5r6rrrrrWsc@seZdZdS)r
N)r4r5r6rrrrr
Zsc@seZdZdS)rN)r4r5r6rrrrr]sc@seZdZdS)rN)r4r5r6rrrrr`sc@seZdZddZdS)rcCs+|st|}|f|_||_dS)N)rZrr2)r0r2rrrrUdszBadStatusLine.__init__N)r4r5r6rUrrrrrcsc@seZdZddZdS)rcCstj|dt|fdS)Nz&got more than %d bytes when reading %s)rrUr;)r0Z	line_typerrrrUkszLineTooLong.__init__N)r4r5r6rUrrrrrjsc@seZdZddZdS)rcOs'tj|dtj|||dS)NrW)rrUConnectionResetError)r0poskwrrrrUpszRemoteDisconnected.__init__N)r4r5r6rUrrrrros)BrZemail.parserrCZ
email.messageriorrerrZurllib.parser__all__rrrJrrrglobalsupdaterZ__members__rrrr;r<compile	fullmatchrrrrrrr'rZMessager(r?rEBufferedIOBaserrr	ImportErrorrr/r
rrrrrr	r
rr
rrrrrrrrrrr<module>Es~				
0