+
    üÐj(  ã                   óî   € R t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHtH	t	 ^ RI
HtHtHtHt ^ RIHt ^ RIHtHtHtHtHtHtHtHt  ! R R]P4                  4      tR	 t ! R
 R]P8                  4      tR tR# )z9
Support for creating a service which runs a web server.
N)ÚserviceÚstrports)Ú
interfacesÚreactor)Ú	deprecateÚreflectÚ
threadpoolÚusage)Úpb)ÚdemoÚdistribÚresourceÚscriptÚserverÚstaticÚtwcgiÚwsgic            
       ó¼  a € ] tR t^t o RtRt. R!O. R"O. R#O.t. R$O. R%O.t]P                  RRR	]	P                  P                  : R
2R,           .4       ]P                  ! R]P                  ! R4      R]P                  ! R4      R]P                  ! R4      /R7      tRtR tR t]tR tR tR t]tR t]tR tR tR tR tR tR t]t R t!R t"R t#R t$R t%V t&R# )&ÚOptionsz:
Define the options accepted by the I{twistd web} plugin.
z[web options]ÚlogfileNÚcertificateÚprivkeyÚ ÚpersonalzsInstead of generating a webserver, generate a ResourcePublisher which listens on  the port given by --listen, or ~/Ú zif --listen is not specified.z*.logz*.pem)Ú
optActionsz‡This starts a webserver.  If you specify no arguments, it will be a
demo webserver that has the Test class from twisted.web.demo in it.c                ó€   € \         P                  P                  V 4       . V R &   RV R&   . V R&   . V R&   R;V R&   V R&   R# )ÚindexesNÚrootÚextraHeadersÚportsÚportÚhttps)r	   r   Ú__init__©Úselfs   &Ú1/usr/lib/python3/dist-packages/twisted/web/tap.pyr#   ÚOptions.__init__X   sK   € Ü�‰×Ñ˜tÔ$ØˆˆY‰ØˆˆV‰Ø!ˆˆ^ÑØˆˆW‰Ø'+Ð+ˆˆV‰�t˜G“}ó    c           	     ó¸   € \         P                  ! V P                  \        P                  ! R^^^ 4      4      p\
        P                  ! V\        ^R7       WR&   R# )zP
(DEPRECATED: use --listen)
Strports description of port to start the server on
ÚTwisted©ÚcategoryÚ
stacklevelr!   N)r   ÚgetDeprecationWarningStringÚopt_portÚincrementalÚVersionÚwarningsÚwarnÚDeprecationWarning©r%   r!   Úmsgs   && r&   r/   ÚOptions.opt_port`   sH   € ô
 ×3Ò3Ø�M‰Mœ;×.Ò.¨y¸"¸aÀÓCó
ˆô 	�Š�cÔ$6À1ÕEØˆV‹r(   c           	     ó¸   € \         P                  ! V P                  \        P                  ! R^^^ 4      4      p\
        P                  ! V\        ^R7       WR&   R# )z?
(DEPRECATED: use --listen)
Port to listen on for Secure HTTP.
r*   r+   r"   N)r   r.   Ú	opt_httpsr0   r1   r2   r3   r4   r5   s   && r&   r9   ÚOptions.opt_httpsm   sH   € ô
 ×3Ò3Ø�N‰NœK×/Ò/°	¸2¸qÀ!ÓDó
ˆô 	�Š�cÔ$6À1ÕEØˆW‹r(   c                ó6   € V R,          P                  V4       R# )zQ
Add an strports description of port to start the server on.
[default: tcp:8080]
r    N©Úappend)r%   r!   s   &&r&   Ú
opt_listenÚOptions.opt_listenx   s   € ð
 	ˆW�×Ñ˜TÖ"r(   c                ó6   € V R,          P                  V4       R# )zZ
Add the name of a file used to check for directory indexes.
[default: index, index.html]
r   Nr<   )r%   Ú	indexNames   &&r&   Ú	opt_indexÚOptions.opt_index   s   € ð
 	ˆY�×Ñ˜yÖ)r(   c                ó6   € \         P                  ! 4       V R&   R# )zK
Makes a server with ~/public_html and ~/.twistd-web-pb support for
users.
r   N)r   ÚUserDirectoryr$   s   &r&   Úopt_userÚOptions.opt_userˆ   s   € ô
 ×,Ò,Ó.ˆˆV‹r(   c                ó  € \         P                  ! \        P                  P	                  V4      4      V R&   R\
        P                  R\
        P                  /V R,          n        \        P                  V R,          P                  R&   R# )zÖ
<path> is either a specific file or a directory to be set as the root
of the web server. Use this if you have a directory full of HTML, cgi,
epy, or rpy files or any other files that you want to be served up raw.
r   z.epyz.rpyz.cgiN)r   ÚFileÚosÚpathÚabspathr   ÚPythonScriptÚResourceScriptÚ
processorsr   Ú	CGIScript)r%   rK   s   &&r&   Úopt_pathÚOptions.opt_path‘   sa   € ô —{’{¤2§7¡7§?¡?°4Ó#8Ó9ˆˆV‰à”F×'Ñ'Ø”F×)Ñ)ð#
ˆˆV�Ôô +0¯/©/ˆˆV�×Ñ Ó'r(   c                óü   € \        V R,          \        P                  4      '       g   \        P                  ! R4      hVP                  R^4      w  r#\        P                  ! V4      V R,          P                  V&   R# )zP
`ext=class' where `class' is added as a Processor for files ending
with `ext'.
r   z*You can only use --processor after --path.Ú=N)	Ú
isinstancer   rI   r	   Ú
UsageErrorÚsplitr   Ú
namedClassrO   )r%   ÚprocÚextÚklasss   &&  r&   Úopt_processorÚOptions.opt_processorž   s\   € ô
 ˜$˜v�,¬¯©×4Ò4Ü×"Ò"Ð#OÓPÐPØ—Z‘Z  QÓ'‰
ˆÜ'.×'9Ò'9¸%Ó'@ˆˆV�×Ñ Ó$r(   c                óF   € \         P                  ! V4      pV! 4       V R&   R# )z>
Create a Resource subclass with a zero-argument constructor.
r   N)r   rX   )r%   Ú	classNameÚclassObjs   && r&   Ú	opt_classÚOptions.opt_class¨   s   € ô ×%Ò% iÓ0ˆÙ“zˆˆV‹r(   c                ó8   € \         P                  ! V4      V R&   R# )z@
An .rpy file to be used as the root resource of the webserver.
r   N)r   ÚResourceScriptWrapper)r%   Únames   &&r&   Úopt_resource_scriptÚOptions.opt_resource_script¯   s   € ô ×3Ò3°DÓ9ˆˆV‹r(   c                ó|  €  \         P                  ! V4      p\        P                  ! 4       p\        P                  ! TP                  4       \        P                  ! RRTP                  4       \        P                  ! \        Y24      T R&   R#   \        \        3 d    \        P
                  ! RT: 24      hi ; i)zW
The FQPN of a WSGI application object to serve as the root resource of
the webserver.
zNo such WSGI application: ÚafterÚshutdownr   N)r   ÚnamedAnyÚAttributeErrorÚ
ValueErrorr	   rV   r   Ú
ThreadPoolr   ÚcallWhenRunningÚstartÚaddSystemEventTriggerÚstopr   ÚWSGIResource)r%   re   ÚapplicationÚpools   &&  r&   Úopt_wsgiÚOptions.opt_wsgiµ   s—   € ð
	JÜ!×*Ò*¨4Ó0ˆKô ×$Ò$Ó&ˆÜ×Ò §
¡
Ô+Ü×%Ò% g¨z¸4¿9¹9ÔEÜ×(Ò(¬°$ÓDˆˆV‹øô ¤
Ð+ô 	JÜ×"Ò"Ð%?À¹xÐ#HÓIÐIð	Jús   ‚B Â,B;c                óš   € \        V R,          \        P                  4      '       g   \        P                  ! R4      hWR,          n        R# )z1
Specify the default mime-type for static files.
r   z*You can only use --mime_type after --path.N)rU   r   rI   r	   rV   ÚdefaultType)r%   ry   s   &&r&   Úopt_mime_typeÚOptions.opt_mime_typeÃ   s5   € ô ˜$˜v�,¬¯©×4Ò4Ü×"Ò"Ð#OÓPÐPØ#.ˆV�Ö r(   c                ó°   € \        V R,          \        P                  4      '       g   \        P                  ! R4      hV R,          P                  R4       R# )zD
Specify whether or not a request for 'foo' should return 'foo.ext'
r   z1You can only use --allow_ignore_ext after --path.Ú*N©rU   r   rI   r	   rV   Ú	ignoreExtr$   s   &r&   Úopt_allow_ignore_extÚOptions.opt_allow_ignore_extÍ   sC   € ô ˜$˜v�,¬¯©×4Ò4Ü×"Ò"ØFóð ð 	ˆV�×Ñ˜sÖ#r(   c                ó°   € \        V R,          \        P                  4      '       g   \        P                  ! R4      hV R,          P                  V4       R# )zD
Specify an extension to ignore.  These will be processed in order.
r   z+You can only use --ignore_ext after --path.Nr~   )r%   rZ   s   &&r&   Úopt_ignore_extÚOptions.opt_ignore_ext×   s=   € ô ˜$˜v�,¬¯©×4Ò4Ü×"Ò"Ð#SÓTÐTØˆV�×Ñ˜sÖ#r(   c                óš   € VP                  R^4      w  r#V R,          P                  VP                  4       VP                  4       34       R# )zg
Specify an additional header to be included in all responses. Specified
as "HeaderName: HeaderValue".
Ú:r   N)rW   r=   Ústrip)r%   Úheaderre   Úvalues   &&  r&   Úopt_add_headerÚOptions.opt_add_headerß   s:   € ð
 —l‘l 3¨Ó*‰ˆØˆ^Õ×#Ñ# T§Z¡Z£\°5·;±;³=Ð$AÖBr(   c                óÔ  € V R,          e    V R,          P                  V R,          4       V R,          eX    \        P                  ! R4       RP                  T R,          T R,          T R	,          4      pT R,          P                  T4       \        V R,          4      ^ 8X  d    V R
,          '       dw   \        P                  P                  \        P                  P                  R\        P                  P                  4      4      pV R,          P                  RV,           4       R# V R,          P                  R4       R# R#   \         d    \        P
                  ! R4      hi ; i)a  
Set up conditional defaults and check for dependencies.

If SSL is not available but an HTTPS server was configured, raise a
L{UsageError} indicating that this is not possible.

If no server port was supplied, select a default appropriate for the
other options supplied.
r!   Nr    r"   zOpenSSL.SSLzSSL support not installedz$ssl:port={}:privateKey={}:certKey={}r   r   r   Ú~zunix:ztcp:8080)r=   r   ÚnamedModuleÚImportErrorr	   rV   ÚformatÚlenrJ   rK   Ú
expanduserÚjoinr   rE   ÚuserSocketName)r%   Ú
sslStrportrK   s   &  r&   ÚpostOptionsÚOptions.postOptionsç   s!  € ð ��<Ò#Ø��M× Ñ   f¥Ô.Ø��=Ò$ðDÜ×#Ò# MÔ2ð @×FÑFØ�W•Ø�Y•Ø�]Õ#óˆJð
 ��M× Ñ  Ô,Üˆt�G�}Ó Ô"Ø�J×ÔÜ—w‘w×)Ñ)Ü—G‘G—L‘L ¤g×&;Ñ&;×&JÑ&JÓKó�ð �W•×$Ñ$ W¨t¥^Ö4à�W•×$Ñ$ ZÖ0ñ #øô ô DÜ×&Ò&Ð'BÓCÐCðDús   ·E Å"E'© )r   ÚlNz/Path to web CLF (Combined Log Format) log file.)r   Úcú
server.pemz=(DEPRECATED: use --listen) SSL certificate to use for HTTPS. )r   Úkr›   z<(DEPRECATED: use --listen) SSL certificate to use for HTTPS.)ÚnotracebacksÚnzY(DEPRECATED: Tracebacks are disabled by default. See --enable-tracebacks to turn them on.)údisplay-tracebacksr   z�Show uncaught exceptions during rendering tracebacks to the client. WARNING: This may be a security risk and expose private data!)'Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚsynopsisÚoptParametersÚoptFlagsr=   r   rE   r”   r	   ÚCompletionsÚCompleteFilesÚcompDataÚlongdescr#   r/   Úopt_pr9   r>   rB   Úopt_irF   Úopt_urQ   r\   ra   rf   rv   rz   Úopt_mr€   rƒ   rŠ   r–   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r&   r   r      s6  ø‡ € ñð €Hò 	Rò	
ò	
ð€Mò"	
ò	
ð€Hð( ‡O�OàÙð %,×$9Ñ$9×$HÔ$HðKð .õ.ð	
ô	ð × Ò à�u×*Ò*¨7Ó3Ø˜5×.Ò.¨wÓ7Ø�u×*Ò*¨7Ó3ð
ô€HðG€Hò,ò	ð €Eò	ò#ò*ð €Eò/ð €Eò:òAò"ò:òEò/ð €Eò$ò$òC÷1ð 1r(   r   c                óV   € \         P                  ! \        P                  ! V 4      4      # )z´
Create and return a factory which will respond to I{distrib} requests
against the given site.

@type site: L{twisted.web.server.Site}
@rtype: L{twisted.internet.protocol.Factory}
)r
   ÚPBServerFactoryr   ÚResourcePublisher)Úsites   &r&   ÚmakePersonalServerFactoryr¸     s    € ô ×Òœg×7Ò7¸Ó=Ó>Ð>r(   c                   ó,   a € ] tR tRt o R tR tRtV tR# )Ú_AddHeadersResourcei  c                ó   € Wn         W n        R # ©N)Ú_originalResourceÚ_headers)r%   ÚoriginalResourceÚheaderss   &&&r&   r#   Ú_AddHeadersResource.__init__  s   € Ø!1ÔØŽr(   c                ó˜   € V P                    F   w  r4VP                  P                  W44       K"  	  V P                  P	                  W4      # r¼   )r¾   ÚresponseHeadersÚaddRawHeaderr½   ÚgetChildWithDefault)r%   re   Úrequestrœ   Úvs   &&&  r&   rÅ   Ú'_AddHeadersResource.getChildWithDefault  s=   € Ø—M”M‰DˆAØ×#Ñ#×0Ñ0°Ö6ñ "à×%Ñ%×9Ñ9¸$ÓHÐHr(   )r¾   r½   N)r    r¡   r¢   r£   r#   rÅ   r°   r±   r²   s   @r&   rº   rº     s   ø‡ € ò ÷Ið Ir(   rº   c           	      ó´  € \         P                  ! 4       pV R ,          '       d/   V R ,          pV R,          '       d   V R,          V R ,          n        M\        P                  ! 4       p\        V\        P                  4      '       d+   VP                  P                  \        P                  V4       V R,          '       d   \        W R,          4      pV R,          '       d    \        P                  ! W R,          R7      pM\        P                  ! V4      pV R,          '       d   RVn        V R,          '       dL   \         P"                  ! R\$        P&                  ! R	^^^ 4      4      p\(        P*                  ! V\,        ^R
7       V R,          '       d   \/        V4      pV R,           F*  p\0        P                   ! WS4      pVP3                  V4       K,  	  V# )r   r   r   r   )ÚlogPathrŸ   Tr�   z--notracebacksr*   r+   r   r    )r   ÚMultiServiceÚ
indexNamesr   ÚTestrU   r   rI   ÚregistryÚsetComponentr   ÚIServiceCollectionrº   r   ÚSiteÚdisplayTracebacksr   Ú_getDeprecationWarningStringr0   r1   r2   r3   r4   r¸   r   ÚsetServiceParent)ÚconfigÚsr   r·   r6   r!   Úsvcs   &      r&   ÚmakeServicerØ     sa  € Ü×ÒÓ€AØˆf‡~„~Ø�f�~ˆØ�)×ÔØ(.¨yÕ(9ˆF�6�NÔ%øô �yŠy‹{ˆä�$œŸ™×$Ò$Ø�‰×"Ñ"¤:×#@Ñ#@À!ÔDàˆn×ÔÜ" 4°Õ)?Ó@ˆàˆi×ÔÜ�{Š{˜4°	Õ):Ô;‰ä�{Š{˜4Ó ˆàÐ"×#Ô#Ø!%ˆÔð ˆn×ÔÜ×4Ò4Øœk×1Ò1°)¸RÀÀAÓFó
ˆô 	�Š�cÔ$6À1ÕEàˆj×ÔÜ(¨Ó.ˆØ�w—�ˆÜ×Ò˜tÓ*ˆØ×Ñ˜QÖñ  ð €Hr(   )r¤   rJ   r2   r0   Útwisted.applicationr   r   Útwisted.internetr   r   Útwisted.pythonr   r   r   r	   Útwisted.spreadr
   Útwisted.webr   r   r   r   r   r   r   r   r   r¸   ÚResourcerº   rØ   r˜   r(   r&   Ú<module>rß      s^   ðñ
ó
 
Û ã ç 1ß 0ß @Ó @Ý ß T× TÓ Tôo1ˆe�m‰mô o1òd?ôI˜(×+Ñ+ô Iô$r(   