+
    Tj0&                     z   R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt Rt]P,                  ! R4      tR tR t ! R R
]P4                  4      t ! R R]P6                  ]4      t ! R R]P:                  4      t ! R R]P<                  4      tRRR]3R ltR# )a0  
HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21).

Based on wsgiref.simple_server which is part of the standard library since 2.5.

This is a simple server for use in testing or debugging Django apps. It hasn't
been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE!
N)deque)simple_server)ImproperlyConfigured)LimitedStream)get_wsgi_application)connections)log_message)import_string
WSGIServerWSGIRequestHandlerzdjango.serverc                     ^ RI Hp  \        V R4      pVf   \        4       #  \	        V4      #   \
         d   p\        RT,          4      ThRp?ii ; i)a'  
Load and return the WSGI application as configured by the user in
``settings.WSGI_APPLICATION``. With the default ``startproject`` layout,
this will be the ``application`` object in ``projectname/wsgi.py``.

This function, and the ``WSGI_APPLICATION`` setting itself, are only useful
for Django's internal server (runserver); external WSGI servers should just
be configured to point to the correct application object directly.

If settings.WSGI_APPLICATION is not set (is ``None``), return
whatever ``django.core.wsgi.get_wsgi_application`` returns.
)settingsWSGI_APPLICATIONNzBWSGI application '%s' could not be loaded; Error importing module.)django.confr   getattrr   r	   ImportErrorr   )r   app_patherrs      Q/var/www/idalgo/venv/lib/python3.14/site-packages/django/core/servers/basehttp.pyget_internal_wsgi_applicationr      sb     %x!34H#%%X&& "&(01
 	s   
- AAAc                  j    \         P                  ! 4       w  p  p\        V \        \        \
        34      # N)sysexc_info
issubclassBrokenPipeErrorConnectionAbortedErrorConnectionResetError)exc_type_s     r   is_broken_pipe_errorr    9   s1    \\^NHa" 	
     c                   R   a a ] tR t^Et oRt^
tRRRR/V 3R lltV 3R ltRtVt	V ;t
# )	r
   z7BaseHTTPServer that implements the Python WSGI protocolipv6Fallow_reuse_addressTc               n   < V'       d   \         P                  V n        W n        \        SV `  ! V/ VB  R # r   )socketAF_INET6address_familyr$   super__init__)selfr#   r$   argskwargs	__class__s   &$$*,r   r*   WSGIServer.__init__J   s*    "(//D#6 $)&)r!   c                v   < \        4       '       d   \        P                  R V4       R# \        SV `  W4       R# )z- Broken pipe from %sN)r    loggerinfor)   handle_error)r+   requestclient_addressr.   s   &&&r   r3   WSGIServer.handle_errorP   s(    !!KK/@G 9r!   )r(   r$   )__name__
__module____qualname____firstlineno____doc__request_queue_sizer*   r3   __static_attributes____classdictcell____classcell__r.   __classdict__s   @@r   r
   r
   E   s+     A*5 *d *: :r!   c                   `   a a ] tR t^Wt oRtRtRR/V 3R lltV 3R ltR tV 3R lt	R	t
VtV ;t# )
ThreadedWSGIServerz$A threaded version of the WSGIServerTconnections_overrideNc               4   < \         SV `  ! V/ VB  Wn        R # r   )r)   r*   rD   )r+   rD   r,   r-   r.   s   &$*,r   r*   ThreadedWSGIServer.__init__\   s    $)&)$8!r!   c                   < V P                   '       d-   V P                   P                  4        F  w  r4V\        V&   K  	  \        SV `  W4       R # r   )rD   itemsr   r)   process_request_thread)r+   r4   r5   aliasconnr.   s   &&&  r   rI   )ThreadedWSGIServer.process_request_threadb   sD    $$$  $88>>@%)E"  A&w?r!   c                0    \         P                  ! 4        R # r   )r   	close_allr+   s   &r   _close_connections%ThreadedWSGIServer._close_connectionsj   s    r!   c                F   < V P                  4        \        SV `	  V4       R # r   )rP   r)   close_request)r+   r4   r.   s   &&r   rS    ThreadedWSGIServer.close_requestn   s    !g&r!   )rD   )r7   r8   r9   r:   r;   daemon_threadsr*   rI   rP   rS   r=   r>   r?   r@   s   @@r   rC   rC   W   s.     .N94 9@ ' 'r!   rC   c                   Z   a a ] tR t^st oRtV 3R ltV 3R ltV 3R ltV 3R ltRt	Vt
V ;t# )ServerHandlerz1.1c                   <  \        VP                  R4      4      p\        SV `  ! \        W4      W#V3/ VB  R#   \        \        3 d    ^ p L3i ; i)z
Use a LimitedStream so that unread request data will be ignored at
the end of the request. WSGIRequest uses a LimitedStream but it
shouldn't discard the data since the upstream servers usually do this.
This fix applies only for testserver/runserver.
CONTENT_LENGTHN)intget
ValueError	TypeErrorr)   r*   r   )r+   stdinstdoutstderrenvironr-   content_lengthr.   s   &&&&&, r   r*   ServerHandler.__init__v   sZ    	 -=!>?N 	%0&'	
MS	
 I& 	N	s   ; AAc                0  < \         SV `  4        V P                  R ,          R8X  d@   RV P                  9   d/   \	        V P                  R,          4      R8X  d   V P                  R V P                  R ,          R8w  d"   RV P                  9  d   RV P                  R&   MC\        V P                  P                  \        P                  4      '       g   RV P                  R&   V P                  P                  R4      R8X  d   RV P                  n        R# R# )REQUEST_METHODHEADzContent-Length0close
ConnectionTN)r)   cleanup_headersra   headersstr
isinstancerequest_handlerserversocketserverThreadingMixInr[   close_connectionr+   r.   s   &r   rj   ServerHandler.cleanup_headers   s    !LL)*f4 DLL0DLL!123s:-.
 LL)*f4 4)0DLL&D00779T9TUU)0DLL& <<L)W448D  1 5r!   c                `   < V P                  4       P                  4        \        SV `  4        R # r   )	get_stdinreadr)   rh   rs   s   &r   rh   ServerHandler.close   s    r!   c                  < V P                   R ,          R8X  dM    \        V P                  ^ R7       V P                  '       g   V P	                  4        V P                  4        R# \        SV `  4        R#   T P                  4        i ; i)re   rf   )maxlenN)ra   r   resultheaders_sentsend_headersrh   r)   finish_responsers   s   &r   r~   ServerHandler.finish_response   sc    <<()V3
dkk!, (((%%'

G#% 

s   9A6 6B )r7   r8   r9   r:   http_versionr*   rj   rh   r~   r=   r>   r?   r@   s   @@r   rW   rW   s   s#     L
90& &r!   rW   c                   N   a a ] tR t^t oRtR tR tV 3R ltR tR t	Rt
VtV ;t# )r   zHTTP/1.1c                (    V P                   ^ ,          # )    )r5   rO   s   &r   address_string!WSGIRequestHandler.address_string   s    ""1%%r!   c           
     l   V^,          ^ ,          R8X  d&   V^ ,          P                  R4      '       d   RpRpR	pMIV^,          P                  4       '       d+   \        V^,          4      ^8X  d   \        V^,          4      pMRp\	        \
        V.VO5RV P                  RVRV P                  4       /  R# )
   4zzNYou're accessing the development server over HTTPS, but it only supports HTTP.i  Nr4   status_codeserver_timer   )
startswithisdigitlenrZ   r   r1   r4   log_date_time_string)r+   formatr,   r   s   &&* r   r   WSGIRequestHandler.log_message   s    71:a!3!3J!?!?!  KD!W__3tAw<1#4d1g,KK	
 	
 LL		

 $	
 113	
r!   c                r   < V P                    F  pR V9   g   K  V P                   V K  	  \        SV `	  4       # )r   )rk   r)   get_environ)r+   kr.   s   & r   r   WSGIRequestHandler.get_environ   s5    
 AaxLLO  w"$$r!   c                    R V n         V P                  4        V P                   '       g   V P                  4        K$   V P                  P                  \        P
                  4       R#   \        \        3 d     R# i ; i)TN)rr   handle_one_request
connectionshutdownr&   SHUT_WRAttributeErrorOSErrorrO   s   &r   handleWSGIRequestHandler.handle   s`     $!'''##%	OO$$V^^4( 		s   )A( (A=<A=c                   V P                   P                  R4      V n        \        V P                  4      R8  d)   RV n        RV n        RV n        V P                  R4       R# V P                  4       '       g   R# \        V P                   V P                  V P                  4       V P                  4       4      pWn        VP                  V P                  P!                  4       4       R# )zF
Copy of WSGIRequestHandler.handle() but with different ServerHandler
i  i    i  N)rfilereadlineraw_requestliner   requestlinerequest_versioncommand
send_errorparse_requestrW   wfile
get_stderrr   rn   runro   get_app)r+   handlers   & r   r   %WSGIRequestHandler.handle_one_request   s      $zz2259t##$u,!D#%D DLOOC !!##JJ

DOO$5t7G7G7I
 #'DKK'')*r!   )rr   r   r   r   r   )r7   r8   r9   r:   protocol_versionr   r   r   r   r   r=   r>   r?   r@   s   @@r   r   r      s)     !&
.	%+ +r!   Fc                    W3pV'       d   \        R \        P                  V3/ 4      pMTpV! V\        VR7      p	Ve   V! \	        V	RV4      4       V'       d   RV	n        V	P                  V4       V	P                  4        R# )r
   )r#   Nserver_portT)typerp   rq   r   r   rU   set_appserve_forever)
addrportwsgi_handlerr#   	threadingon_bind
server_clsserver_address	httpd_clshttpds
   &&&&&&&   r   r   r      sx     \N(C(CZ'PRTU		n&8tDE}d34  $	MM,	r!   )r
   r   ) r;   loggingr&   rp   r   collectionsr   wsgirefr   django.core.exceptionsr   django.core.handlers.wsgir   django.core.wsgir   	django.dbr   django.utils.logr   django.utils.module_loadingr	   __all__	getLoggerr1   r   r    r
   rq   rC   rW   r   r   r   r!   r   <module>r      s       
  ! 7 3 1 ! ( 5
.			?	+8	:)) :$'44j '8<&M// <&~F+99 F+Z 
r!   