[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.152.49: ~ $


���Z�'�@sddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZmZdZGdd�de�Z dS)�N)�MutableMapping)�partial�)�hdrs)�AbstractAccessLogger�AbstractMatchInfo�AbstractRouter)�
FrozenList)�AccessLogger)�
web_logger)�Signal)�_fix_request_current_app)�Request)�StreamResponse)�Server)�PrefixedSubAppResource�
UrlDispatcher�ApplicationcsAeZdZeddddddddd	d
ddd
dddg�Zdedddfdddd\dddddd�Zdd�Z�fdd �Zd!d"�Z	d#d$�Z
d%d&�Zd'd(�Zd)d*�Z
d+d,�Zd-d.�Zed/d0��Zd1d2�Zed3d4��Zd5d6�Zed7d8��Zd9d:�Zd;d<�Zed=d>��Zed?d@��ZedAdB��ZedCdD��ZedEdF��ZedGdH��ZdddIedJdK�ZdLdM�Z dNdO�Z!dPdQ�Z"e#dRdS�Z$dTdU�Z%dVdW�Z&dXdY�Z'dZd[�Z(�S)]r�logger�_debug�_router�_loop�
_handler_args�_middlewares�_middlewares_handlers�_run_middlewares�_state�_frozen�_subapps�_on_response_prepare�_on_startup�_on_shutdown�_on_cleanup�_client_max_size�routerN�middlewares�handler_args�client_max_sizei��loop�debug.cCs|dkrt�}t|t�s0t|��|dk	rRtjdtdd�||_||_||_	||_
||_t|�|_
d|_d|_i|_d|_g|_t|�|_t|�|_t|�|_t|�|_||_dS)Nzloop argument is deprecated�
stacklevelr(F)r�
isinstancer�AssertionError�warnings�warn�DeprecationWarningrrrrrr	rrrrrrrrr r!r"r#)�selfrr$r%r&r'r)r*�r2�/web_app.py�__init__s,											zApplication.__init__cCs&tjdj|j�tdd�dS)Nz8Inheritance class {} from web.Application is discouragedr+r()r.r/�format�__name__r0)�clsr2r2r3�__init_subclass__As	zApplication.__init_subclass__csE||jkr.tjdj|�tdd�t�j||�dS)Nz:Setting custom web.Application.{} attribute is discouragedr+r()�ATTRSr.r/r5r0�super�__setattr__)r1�name�val)�	__class__r2r3r;GszApplication.__setattr__cCs
||kS)Nr2)r1�otherr2r2r3�__eq__QszApplication.__eq__cCs|j|S)N)r)r1�keyr2r2r3�__getitem__TszApplication.__getitem__cCs#|jrtjdtdd�dS)Nz=Changing state of started or joined application is deprecatedr+�)rr.r/r0)r1r2r2r3�
_check_frozenWs		zApplication._check_frozencCs|j�||j|<dS)N)rDr)r1rA�valuer2r2r3�__setitem__^s
zApplication.__setitem__cCs|j�|j|=dS)N)rDr)r1rAr2r2r3�__delitem__bs
zApplication.__delitem__cCs
t|j�S)N)�lenr)r1r2r2r3�__len__fszApplication.__len__cCs
t|j�S)N)�iterr)r1r2r2r3�__iter__iszApplication.__iter__cCs|jS)N)r)r1r2r2r3r)mszApplication.loopcCs�|dkrtj�}|jdk	rB|j|k	rBtd��||_|jdkri|j�|_x|jD]}|j|�qsWdS)Nz8web.Application instance initialized with different loop.)�asyncioZget_event_loopr�RuntimeErrorrZ	get_debugr�	_set_loop)r1r)�subappr2r2r3rNqs		zApplication._set_loopcCs|jS)N)r)r1r2r2r3�frozen�szApplication.frozencCs�|jr
dSd|_|jj�|jj�|jj�|jj�|jj�|jj�t|j	��|_
|jr�dnd|_x0|j
D]%}|j�|jp�|j|_q�WdS)NTF)rr�freezerrr r!r"�tuple�_prepare_middlewarerr%rr)r1rOr2r2r3rQ�s		






zApplication.freezecCs|jS)N)r)r1r2r2r3r*�szApplication.debugcs7��fdd�}|d�|d�|d�dS)NcsDt�|����fdd�}t�|�}|j|�dS)Nc�s�j��IdHdS)N)�send)�app)rO�subsigr2r3�handler�szEApplication._reg_subapp_signals.<locals>.reg_handler.<locals>.handler)�getattr�append)ZsignamerWZappsig)r1rO)rVr3�reg_handler�sz4Application._reg_subapp_signals.<locals>.reg_handler�
on_startup�on_shutdown�
on_cleanupr2)r1rOrZr2)r1rOr3�_reg_subapp_signals�s

zApplication._reg_subapp_signalscCs�|jrtd��|jr*td��|jd�rI|dd�}|dkratd��t||�}|jj|�|j|�|jj	|�|j
�|jdk	r�|j|j�|S)	Nz0Cannot add sub application to frozen applicationzCannot add frozen application�/r�zPrefix cannot be empty���)r`r_)
rPrM�endswith�
ValueErrorrr$Zregister_resourcer^rrYrQrrN)r1�prefixrOZresourcer2r2r3�
add_subapp�s"			

zApplication.add_subappcCs|jS)N)r)r1r2r2r3�on_response_prepare�szApplication.on_response_preparecCs|jS)N)r )r1r2r2r3r[�szApplication.on_startupcCs|jS)N)r!)r1r2r2r3r\�szApplication.on_shutdowncCs|jS)N)r")r1r2r2r3r]�szApplication.on_cleanupcCs|jS)N)r)r1r2r2r3r$�szApplication.routercCs|jS)N)r)r1r2r2r3r%�szApplication.middlewares�access_log_classc	Ks�t|t�s$tdj|���|j|�|j�|j|d<|jr{x'|jj�D]\}}|||<qaWt	|j
d|jd|d|j|�S)NzMaccess_log_class must be subclass of aiohttp.abc.AbstractAccessLogger, got {}r*Zrequest_factoryrgr))
�
issubclassr�	TypeErrorr5rNrQr*r�itemsr�_handle�
_make_requestr))r1r)rg�kwargs�k�vr2r2r3�make_handler�s


	zApplication.make_handlerc�s|jj|�IdHdS)zmCauses on_startup signal

        Should be called in the event loop along with the request handler.
        N)r[rT)r1r2r2r3�startup�szApplication.startupc�s|jj|�IdHdS)zMCauses on_shutdown signal

        Should be called before cleanup()
        N)r\rT)r1r2r2r3�shutdown�szApplication.shutdownc�s|jj|�IdHdS)zLCauses on_cleanup signal

        Should be called after shutdown()
        N)r]rT)r1r2r2r3�cleanupszApplication.cleanupc	Cs%|||||||jd|j�S)Nr')rr#)r1�messageZpayload�protocol�writerZtask�_clsr2r2r3rl	s	zApplication._make_requestccsxgt|j�D]V}t|dd�dkr<|dfVqtjdj|�tdd�|dfVqWt|�dfVdS)NZ__middleware_version__rTz1old-style middleware "{!r}" deprecated, see #2252r+r(F)�reversedrrXr.r/r5r0r
)r1�mr2r2r3rSs
zApplication._prepare_middlewarec	�sy|jj|�IdH}t|t�s2t|��|j|�|j�d}||_|jj	t
j�}|r�|j|�IdH}|j
j�IdH|dkr2|j}|jr!xg|jddd�D]O}xF|jD];\}}|rt|d|�}q�|||�IdH}q�Wq�W||�IdH}t|t�sutdj|jt|�dd�|jD����|S)NrrWzIHandler {!r} should return response instance, got {!r} [middlewares {!r}]cSs&g|]}|jD]}|�qqSr2)r%)�.0rUZ
middlewarer2r2r3�
<listcomp><s	z'Application._handle.<locals>.<listcomp>ra)rZresolver,rr-Zadd_apprQZ_match_infoZheaders�getrZEXPECTZexpect_handlerrvZdrainrWrZappsrrrr5�type)	r1ZrequestZ
match_infoZresp�expectrWrUryZ	new_styler2r2r3rks2

				zApplication._handlecCs|S)zgunicorn compatibilityr2)r1r2r2r3�__call__AszApplication.__call__cCsdjt|��S)Nz<Application 0x{:x}>)r5�id)r1r2r2r3�__repr__EszApplication.__repr__i))r6�
__module__�__qualname__�	frozensetr9rr4r8r;r@rBrDrFrGrIrK�propertyr)rNrPrQr*r^rerfr[r\r]r$r%r
rprqrrrsrrlrSrkrr�r2r2)r>r3rs^			
%)r)!rLr.�collectionsr�	functoolsrr`r�abcrrrZ
frozenlistr	Zhelpersr
�logrZsignalsrZweb_middlewaresr
Zweb_requestrZweb_responserZ
web_serverrZweb_urldispatcherrr�__all__rr2r2r2r3�<module>s 

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 947 B 0644
__init__.cpython-35.pyc File 947 B 0644
abc.cpython-35.opt-1.pyc File 6.08 KB 0644
abc.cpython-35.pyc File 6.08 KB 0644
client.cpython-35.opt-1.pyc File 22.11 KB 0644
client.cpython-35.pyc File 22.11 KB 0644
client_exceptions.cpython-35.opt-1.pyc File 8.04 KB 0644
client_exceptions.cpython-35.pyc File 8.04 KB 0644
client_proto.cpython-35.opt-1.pyc File 5.01 KB 0644
client_proto.cpython-35.pyc File 5.01 KB 0644
client_reqrep.cpython-35.opt-1.pyc File 23.56 KB 0644
client_reqrep.cpython-35.pyc File 23.69 KB 0644
client_ws.cpython-35.opt-1.pyc File 8.09 KB 0644
client_ws.cpython-35.pyc File 8.09 KB 0644
connector.cpython-35.opt-1.pyc File 24.95 KB 0644
connector.cpython-35.pyc File 24.95 KB 0644
cookiejar.cpython-35.opt-1.pyc File 8.4 KB 0644
cookiejar.cpython-35.pyc File 8.4 KB 0644
formdata.cpython-35.opt-1.pyc File 4.19 KB 0644
formdata.cpython-35.pyc File 4.19 KB 0644
frozenlist.cpython-35.opt-1.pyc File 2.73 KB 0644
frozenlist.cpython-35.pyc File 2.73 KB 0644
hdrs.cpython-35.opt-1.pyc File 3.72 KB 0644
hdrs.cpython-35.pyc File 3.72 KB 0644
helpers.cpython-35.opt-1.pyc File 24.01 KB 0644
helpers.cpython-35.pyc File 24.01 KB 0644
http.cpython-35.opt-1.pyc File 1.26 KB 0644
http.cpython-35.pyc File 1.26 KB 0644
http_exceptions.cpython-35.opt-1.pyc File 3.55 KB 0644
http_exceptions.cpython-35.pyc File 3.55 KB 0644
http_parser.cpython-35.opt-1.pyc File 14.1 KB 0644
http_parser.cpython-35.pyc File 14.16 KB 0644
http_websocket.cpython-35.opt-1.pyc File 13.92 KB 0644
http_websocket.cpython-35.pyc File 14.01 KB 0644
http_writer.cpython-35.opt-1.pyc File 4.06 KB 0644
http_writer.cpython-35.pyc File 4.06 KB 0644
locks.cpython-35.opt-1.pyc File 1.39 KB 0644
locks.cpython-35.pyc File 1.39 KB 0644
log.cpython-35.opt-1.pyc File 409 B 0644
log.cpython-35.pyc File 409 B 0644
multipart.cpython-35.opt-1.pyc File 25.14 KB 0644
multipart.cpython-35.pyc File 25.59 KB 0644
payload.cpython-35.opt-1.pyc File 9.29 KB 0644
payload.cpython-35.pyc File 9.42 KB 0644
payload_streamer.cpython-35.opt-1.pyc File 2.58 KB 0644
payload_streamer.cpython-35.pyc File 2.58 KB 0644
pytest_plugin.cpython-35.opt-1.pyc File 9.22 KB 0644
pytest_plugin.cpython-35.pyc File 9.28 KB 0644
resolver.cpython-35.opt-1.pyc File 3.33 KB 0644
resolver.cpython-35.pyc File 3.33 KB 0644
signals.cpython-35.opt-1.pyc File 1.23 KB 0644
signals.cpython-35.pyc File 1.23 KB 0644
streams.cpython-35.opt-1.pyc File 16.41 KB 0644
streams.cpython-35.pyc File 16.74 KB 0644
tcp_helpers.cpython-35.opt-1.pyc File 1.37 KB 0644
tcp_helpers.cpython-35.pyc File 1.37 KB 0644
test_utils.cpython-35.opt-1.pyc File 17.71 KB 0644
test_utils.cpython-35.pyc File 17.76 KB 0644
tracing.cpython-35.opt-1.pyc File 11.2 KB 0644
tracing.cpython-35.pyc File 11.2 KB 0644
web.cpython-35.opt-1.pyc File 4.65 KB 0644
web.cpython-35.pyc File 4.65 KB 0644
web_app.cpython-35.opt-1.pyc File 9.78 KB 0644
web_app.cpython-35.pyc File 10.24 KB 0644
web_exceptions.cpython-35.opt-1.pyc File 11.98 KB 0644
web_exceptions.cpython-35.pyc File 11.98 KB 0644
web_fileresponse.cpython-35.opt-1.pyc File 5.44 KB 0644
web_fileresponse.cpython-35.pyc File 5.44 KB 0644
web_middlewares.cpython-35.opt-1.pyc File 2.63 KB 0644
web_middlewares.cpython-35.pyc File 2.63 KB 0644
web_protocol.cpython-35.opt-1.pyc File 13.36 KB 0644
web_protocol.cpython-35.pyc File 13.39 KB 0644
web_request.cpython-35.opt-1.pyc File 19.16 KB 0644
web_request.cpython-35.pyc File 19.16 KB 0644
web_response.cpython-35.opt-1.pyc File 17.11 KB 0644
web_response.cpython-35.pyc File 17.84 KB 0644
web_runner.cpython-35.opt-1.pyc File 9.55 KB 0644
web_runner.cpython-35.pyc File 9.55 KB 0644
web_server.cpython-35.opt-1.pyc File 2.04 KB 0644
web_server.cpython-35.pyc File 2.04 KB 0644
web_urldispatcher.cpython-35.opt-1.pyc File 37.12 KB 0644
web_urldispatcher.cpython-35.pyc File 38.15 KB 0644
web_ws.cpython-35.opt-1.pyc File 12.52 KB 0644
web_ws.cpython-35.pyc File 12.52 KB 0644
worker.cpython-35.opt-1.pyc File 6.4 KB 0644
worker.cpython-35.pyc File 6.4 KB 0644