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.7/wsgiref/__pycache__/handlers.cpython-37.pyc
B

îÇ{a	Rã
@sdZddlmZmZmZddlmZddlZddlZddl	Z	dddd	d
dgZ
dd
dddddgZdddddddddddddg
Zdd „Z
d!d"d#d$d%d&d'd(d)d*h
jZd+d,„Zd-d„ZGd.d„dƒZGd/d„deƒZGd0d„deƒZGd1d	„d	eƒZGd2d
„d
eƒZdS)3z/Base classes for server/gateway implementationsé)ÚFileWrapperÚguess_schemeÚ
is_hop_by_hop)ÚHeaderséNÚBaseHandlerÚ
SimpleHandlerÚBaseCGIHandlerÚ
CGIHandlerÚ
IISCGIHandlerÚread_environZMonZTueZWedZThuZFriZSatZSunZJanZFebZMarZAprZMayZJunZJulZAugZSepZOctZNovZDecc
	Cs:t |¡\	}}}}}}}}}	dt||t|||||fS)Nz#%s, %02d %3s %4d %02d:%02d:%02d GMT)ÚtimeZgmtimeÚ_weekdaynameÚ
_monthname)
Z	timestampZyearZmonthZdayZhhZmmZssZwdÚyÚz©rú&/usr/lib/python3.7/wsgiref/handlers.pyÚformat_date_timesrÚSCRIPT_NAMEÚ	PATH_INFOZQUERY_STRINGZREQUEST_METHODZ	AUTH_TYPEZCONTENT_TYPEZCONTENT_LENGTHZHTTPSZREMOTE_USERZREMOTE_IDENTcCs6t|ƒp4| d¡p4| d¡p4| d¡o4t|dd…ƒS)NZHTTP_ZSSL_Z	REDIRECT_é	)Ú_is_requestÚ
startswithÚ_needs_transcode)ÚkrrrrsrcCsôt ¡}d}yd d|¡Wntk
r4d}YnXi}x´tj ¡D]¦\}}t|ƒrätjdkrÒtj 	dd¡ 
¡}| d¡rŽ| d¡ d¡}qä| d	¡ršqä| d
¡r¾d|kr¾| d¡ d¡}qä| |d¡ d¡}n| ||¡ d¡}|||<qFW|S)z'Read environment, fixing HTTP variablesÚsurrogateescapeÚzutf-8ÚreplaceZwin32ÚSERVER_SOFTWAREzmicrosoft-iis/z
iso-8859-1zapache/zsimplehttp/zpython/3)
ÚsysÚgetfilesystemencodingÚencodeÚLookupErrorÚosÚenvironÚitemsrÚplatformÚgetÚlowerrÚdecode)ÚencZescr%rÚvZsoftwarerrrr"s,

	


c@s"eZdZdZdZdZdZdZdZdZ	dZ
eƒZe
ZeZdZdZdgZd	ZdZZdZdZd
Zdd„Zd
d„Zdd„Zdd„Zdd„Zdd„Zd;dd„Z dd„Z!dd„Z"dd„Z#dd „Z$d!d"„Z%d#d$„Z&d%d&„Z'd'd(„Z(d)d*„Z)d+d,„Z*d-d.„Z+d/d0„Z,d1d2„Z-d3d4„Z.d5d6„Z/d7d8„Z0d9d:„Z1dS)<rz+Manage the invocation of a WSGI application)rrTFz1.0Nz500 Internal Server Error)zContent-Typez
text/plains;A server error occurred.  Please contact the administrator.rc	CsZy$| ¡||j|jƒ|_| ¡Wn0y| ¡Wn| ¡‚YnXYnXdS)zInvoke the applicationN)Ú
setup_environr%Ústart_responseÚresultÚfinish_responseÚhandle_errorÚclose)ÚselfZapplicationrrrÚrun€szBaseHandler.runcCs–|j ¡}|_| ¡| ¡|d<| ¡|d<|j|d<|j|d<| ¡|d<|j	|d<|j
|d<|jdk	rx|j|d	<|jr’|j
r’| d
|j
¡dS)z&Set up the environment for one requestz
wsgi.inputzwsgi.errorszwsgi.versionz
wsgi.run_oncezwsgi.url_schemezwsgi.multithreadzwsgi.multiprocessNzwsgi.file_wrapperr)Ú
os_environÚcopyr%Úadd_cgi_varsÚ	get_stdinÚ
get_stderrÚwsgi_versionÚ
wsgi_run_onceÚ
get_schemeÚwsgi_multithreadÚwsgi_multiprocessÚwsgi_file_wrapperÚ
origin_serverÚserver_softwareÚ
setdefault)r3Úenvrrrr-”s





zBaseHandler.setup_environcCsFz6| ¡r| ¡s4x|jD]}| |¡qW| ¡Wd| ¡XdS)a>Send any iterable data, then close self and the iterable

        Subclasses intended for use in asynchronous servers will
        want to redefine this method, such that it sets up callbacks
        in the event loop to iterate over the data, and to call
        'self.close()' once the response is finished.
        N)Úresult_is_fileÚsendfiler/ÚwriteÚfinish_contentr2)r3Údatarrrr0©szBaseHandler.finish_responsecCs
t|jƒS)z Return the URL scheme being used)rr%)r3rrrr<ºszBaseHandler.get_schemec
CsJyt|jƒ}Wntttfk
r(YnX|dkrFt|jƒ|jd<dSdS)z@Compute Content-Length or switch to chunked encoding if possiblerzContent-LengthN)Úlenr/Ú	TypeErrorÚAttributeErrorÚNotImplementedErrorÚstrÚ
bytes_sentÚheaders)r3ZblocksrrrÚset_content_length¿szBaseHandler.set_content_lengthcCsd|jkr| ¡dS)zqMake any necessary header changes or defaults

        Subclasses can extend this to add other defaults.
        zContent-LengthN)rOrP)r3rrrÚcleanup_headersÌs
zBaseHandler.cleanup_headerscCsâ|r2z$|jr&|d|dƒ |d¡‚Wdd}Xn|jdk	rDtdƒ‚||_| |¡|_| |d¡}t|ƒdksvtdƒ‚|dd	… ¡sŽtd
ƒ‚|d	dks¢tdƒ‚x8|D]0\}}| |d
¡}| |d¡}t	|ƒr¨tdƒ‚q¨W|j
S)z4'start_response()' callable as specified by PEP 3333rréNzHeaders already set!ZStatuséz$Status must be at least 4 characterséz(Status message must begin w/3-digit codeú z+Status message must have a space after codezHeader namezHeader valuezHop-by-hop headers not allowed)Úheaders_sentÚwith_tracebackrOÚAssertionErrorÚstatusÚ
headers_classÚ_convert_string_typerIÚisdigitrrF)r3rYrOÚexc_infoÚnameÚvalrrrr.Ôs$
zBaseHandler.start_responsecCs(t|ƒtkr|Std |t|ƒ¡ƒ‚dS)zConvert/check value type.z!{0} must be of type str (got {1})N)ÚtyperMrXÚformatÚrepr)r3ÚvalueÚtitlerrrr[ðsz BaseHandler._convert_string_typecCs’|jrx| ¡rŽ| d|j|jf d¡¡d|jkrP| dtt ¡ƒ d¡¡|j	rŽd|jkrŽ| d|j	 d¡¡n| d|j d¡¡dS)	z6Transmit version/status/date/server, via self._write()zHTTP/%s %s
z
iso-8859-1ZDatez
Date: %s
ZServerzServer: %s
zStatus: %s
N)
r@Úclient_is_modernÚ_writeÚhttp_versionrYr"rOrr
rA)r3rrrÚ
send_preambleøs
zBaseHandler.send_preamblecCsft|ƒtkstdƒ‚|js$tdƒ‚n,|js>t|ƒ|_| ¡n|jt|ƒ7_| |¡| 	¡dS)z+'write()' callable as specified by PEP 3333z)write() argument must be a bytes instancezwrite() before start_response()N)
r`ÚbytesrXrYrVrIrNÚsend_headersrfÚ_flush)r3rHrrrrFs



zBaseHandler.writecCsdS)aPlatform-specific file transmission

        Override this method in subclasses to support platform-specific
        file transmission.  It is only called if the application's
        return iterable ('self.result') is an instance of
        'self.wsgi_file_wrapper'.

        This method should return a true value if it was able to actually
        transmit the wrapped file-like object using a platform-specific
        approach.  It should return a false value if normal iteration
        should be used instead.  An exception can be raised to indicate
        that transmission was attempted, but failed.

        NOTE: this method should call 'self.send_headers()' if
        'self.headers_sent' is false and it is going to attempt direct
        transmission of the file.
        Fr)r3rrrrEszBaseHandler.sendfilecCs"|js|j dd¡| ¡ndS)z.Ensure headers and content have both been sentzContent-LengthÚ0N)rVrOrBrj)r3rrrrG0s
zBaseHandler.finish_contentc	CsFzt|jdƒr|j ¡Wdd|_|_|_|_d|_d|_XdS)z„Close the iterable (if needed) and reset all instance vars

        Subclasses may want to also drop the client connection.
        r2NrF)Úhasattrr/r2rOrYr%rNrV)r3rrrr2:szBaseHandler.closecCs8| ¡d|_|jr| ¡r4| ¡| t|jƒ¡dS)z1Transmit headers to the client, via self._write()TN)rQrVr@rerhrfrirO)r3rrrrjGs
zBaseHandler.send_headerscCs|j}|dk	ot|j|ƒS)z@True if 'self.result' is an instance of 'self.wsgi_file_wrapper'N)r?Ú
isinstancer/)r3ÚwrapperrrrrDPszBaseHandler.result_is_filecCs|jd ¡dkS)z,True if client can accept status and headersZSERVER_PROTOCOLzHTTP/0.9)r%Úupper)r3rrrreVszBaseHandler.client_is_moderncCsJz>ddlm}| ¡}||d|d|d|j|ƒ| ¡Wdd}XdS)zLog the 'exc_info' tuple in the server log

        Subclasses may override to retarget the output or change its format.
        r)Úprint_exceptionrrRN)Ú	tracebackrqr9Útraceback_limitÚflush)r3r]rqÚstderrrrrÚ
log_exception[s
zBaseHandler.log_exceptioncCs2| t ¡¡|js.| |j|j¡|_| ¡dS)z>Log current error, and send error output to client if possibleN)	rvr r]rVÚerror_outputr%r.r/r0)r3rrrr1kszBaseHandler.handle_errorcCs$||j|jdd…t ¡ƒ|jgS)aZWSGI mini-app to create error output

        By default, this just uses the 'error_status', 'error_headers',
        and 'error_body' attributes to generate an output page.  It can
        be overridden in a subclass to dynamically generate diagnostics,
        choose an appropriate message for the user's preferred language, etc.

        Note, however, that it's not recommended from a security perspective to
        spit out diagnostics to any old user; ideally, you should have to do
        something special to enable diagnostic output, which is why we don't
        include any here!
        N)Úerror_statusÚ
error_headersr r]Ú
error_body)r3r%r.rrrrwss
zBaseHandler.error_outputcCst‚dS)aOverride in subclass to buffer data for send to client

        It's okay if this method actually transmits the data; BaseHandler
        just separates write and flush operations for greater efficiency
        when the underlying system actually has such a distinction.
        N)rL)r3rHrrrrf†szBaseHandler._writecCst‚dS)z¬Override in subclass to force sending of recent '_write()' calls

        It's okay if this method is a no-op (i.e., if '_write()' actually
        sends the data.
        N)rL)r3rrrrkszBaseHandler._flushcCst‚dS)z4Override in subclass to return suitable 'wsgi.input'N)rL)r3rrrr8—szBaseHandler.get_stdincCst‚dS)z5Override in subclass to return suitable 'wsgi.errors'N)rL)r3rrrr9›szBaseHandler.get_stderrcCst‚dS)z>Override in subclass to insert CGI variables in 'self.environ'N)rL)r3rrrr7ŸszBaseHandler.add_cgi_vars)N)2Ú__name__Ú
__module__Ú__qualname__Ú__doc__r:r=r>r;r@rgrArr5rr?rrZrsrxryrzrYr/rVrOrNr4r-r0r<rPrQr.r[rhrFrErGr2rjrDrervr1rwrfrkr8r9r7rrrrr^sV



		c@sBeZdZdZddd„Zdd„Zdd	„Zd
d„Zdd
„Zdd„Z	dS)raqHandler that's just initialized with streams, environment, etc.

    This handler subclass is intended for synchronous HTTP/1.0 origin servers,
    and handles sending the entire response output, given the correct inputs.

    Usage::

        handler = SimpleHandler(
            inp,out,err,env, multithread=False, multiprocess=True
        )
        handler.run(app)TFcCs(||_||_||_||_||_||_dS)N)ÚstdinÚstdoutruÚbase_envr=r>)r3rr€rur%ÚmultithreadÚmultiprocessrrrÚ__init__±szSimpleHandler.__init__cCs|jS)N)r)r3rrrr8»szSimpleHandler.get_stdincCs|jS)N)ru)r3rrrr9¾szSimpleHandler.get_stderrcCs|j |j¡dS)N)r%Úupdater)r3rrrr7ÁszSimpleHandler.add_cgi_varscCsb|j |¡}|dks |t|ƒkr$dSddlm}|dtƒx"||d…}|sNP|j |¡}q<WdS)Nr)Úwarnz9SimpleHandler.stdout.write() should not do partial writes)r€rFrIÚwarningsr†ÚDeprecationWarning)r3rHr/r†rrrrfÄszSimpleHandler._writecCs|j ¡|jj|_dS)N)r€rtrk)r3rrrrkÑs
zSimpleHandler._flushN)TF)
r{r|r}r~r„r8r9r7rfrkrrrrr¤s
	
c@seZdZdZdZdS)r	aÚCGI-like systems using input/output/error streams and environ mapping

    Usage::

        handler = BaseCGIHandler(inp,out,err,env)
        handler.run(app)

    This handler class is useful for gateway protocols like ReadyExec and
    FastCGI, that have usable input/output/error streams and an environment
    mapping.  It's also the base class for CGIHandler, which just uses
    sys.stdin, os.environ, and so on.

    The constructor also takes keyword arguments 'multithread' and
    'multiprocess' (defaulting to 'True' and 'False' respectively) to control
    the configuration sent to the application.  It sets 'origin_server' to
    False (to enable CGI-like output), and assumes that 'wsgi.run_once' is
    False.
    FN)r{r|r}r~r@rrrrr	Ösc@s eZdZdZdZiZdd„ZdS)r
aéCGI-based invocation via sys.stdin/stdout/stderr and os.environ

    Usage::

        CGIHandler().run(app)

    The difference between this class and BaseCGIHandler is that it always
    uses 'wsgi.run_once' of 'True', 'wsgi.multithread' of 'False', and
    'wsgi.multiprocess' of 'True'.  It does not take any initialization
    parameters, but always uses 'sys.stdin', 'os.environ', and friends.

    If you need to override any of these parameters, use BaseCGIHandler
    instead.
    Tc	Cs(tj|tjjtjjtjtƒddddS)NFT)r‚rƒ)r	r„r rÚbufferr€rur)r3rrrr„szCGIHandler.__init__N)r{r|r}r~r;r5r„rrrrr
îsc@s eZdZdZdZiZdd„ZdS)raCGI-based invocation with workaround for IIS path bug

    This handler should be used in preference to CGIHandler when deploying on
    Microsoft IIS without having set the config allowPathInfo option (IIS>=7)
    or metabase allowPathInfoForScriptMappings (IIS<7).
    Tc	Csjtƒ}| dd¡}| dd¡}|d |d¡rD|t|ƒd…|d<tj|tjjtj	jtj
|ddddS)Nrrrú/FT)r‚rƒ)rr(rrIr	r„r rr‰r€ru)r3r%ÚpathZscriptrrrr„$szIISCGIHandler.__init__N)r{r|r}r~r;r5r„rrrrrs)r~ÚutilrrrrOrr r$r
Ú__all__rrrÚ__contains__rrrrrr	r
rrrrrÚ<module>s*
<H2