+
    TjG8                     $   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ RIHtHtHtHtHtHtHt ^ R	IHt ^ R
IHt ]P>                  ! R4      t R t! ! R R]4      t" ! R R]PF                  4      t$R# )    N)aclosing)ThreadSensitiveContextsync_to_async)settings)signals)RequestAbortedRequestDataTooBig)base)FileResponseHttpRequestHttpResponseHttpResponseBadRequestHttpResponseServerError	QueryDictparse_cookie)set_script_prefix)cached_propertyzdjango.requestc                    \         P                  '       d   \         P                  # V P                  RR4      ;'       g    R# )zE
Return the script prefix to use from either the scope or a setting.
	root_path )r   FORCE_SCRIPT_NAMEget)scopes   &N/var/www/idalgo/venv/lib/python3.14/site-packages/django/core/handlers/asgi.pyget_script_prefixr      s5     !!!)))99["%+++    c                      a a ] tR t^&t oRt^<tR t]R 4       tV 3R lt	R t
R tR t]! ]
]4      t]! ]4      t]R 4       tV 3R	 ltR
tVtV ;t# )ASGIRequestzj
Custom request subclass that decodes from an ASGI-standard request dict
and wraps request body handling.
c                   Wn         R V n        R V n        RV n        VR,          V n        \        V4      V n        V P                  '       d)   VR,          P                  V P                  4      V n        MVR,          V n        V P                   R,          P                  4       V n
        V P                   P                  RR4      p\        V\        4      '       d   VP                  4       pRV P                  RVRV P                  R	V P                  R
RRR/V n        V P                   P                  R4      '       do   V P                   R,          ^ ,          V P                  R&   V P                  R,          V P                  R&   V P                   R,          ^,          V P                  R&   V P                   P                  R4      '       dY   V P                   R,          ^ ,          V P                  R&   \!        V P                   R,          ^,          4      V P                  R&   MRV P                  R&   RV P                  R&   V P                   P                  R. 4       F  w  rEVP                  R4      pVR8X  d   RpM1VR8X  d   RpM'RVP                  4       P#                  RR4      ,          pVP                  R4      pVR8X  dE   VP%                  R 4      pRV P                  9   d"   V P                  V,          R ,           V,           pM1W`P                  9   d"   V P                  V,          R!,           V,           pWPP                  V&   K  	  V P'                  V P                  4       W n        RV n        R# )"FNpathmethodquery_stringr   REQUEST_METHODQUERY_STRINGSCRIPT_NAME	PATH_INFOzwsgi.multithreadTzwsgi.multiprocessclientREMOTE_ADDRREMOTE_HOSTREMOTE_PORTserverSERVER_NAMESERVER_PORTunknown0headerslatin1zcontent-lengthCONTENT_LENGTHzcontent-typeCONTENT_TYPEzHTTP_%s-_HTTP_COOKIEz; ,)r   _post_parse_error_read_startedresolver_matchr    r   script_nameremoveprefix	path_infoupperr!   r   
isinstancebytesdecodeMETAstrreplacerstrip_set_content_type_params_stream)selfr   	body_filer"   namevaluecorrected_names   &&&    r   __init__ASGIRequest.__init__0   s   
!&""&M	,U3"6]778H8HIDN"6]DNjj*002zz~~nb9lE**'..0LdkkL4++
	 ::>>(##'+zz(';A'>DIIm$'+yy'?DIIm$'+zz(';A'>DIIm$::>>(##'+zz(';A'>DIIm$'*4::h+?+B'CDIIm$'0DIIm$'*DIIm$::>>)R8KD;;x(D''!1'!/!*TZZ\-A-A#s-K!K LL*E.T* DII- IIn5<uDE99,		.1C7%?(-IIn%# 9& 	%%dii0 "r   c                :    \        V P                  R ,          4      # )r$   )r   rB   rH   s   &r   GETASGIRequest.GETo   s    >233r   c                f   < V P                   P                  R 4      ;'       g    \        SV `  4       # )scheme)r   r   super_get_schemerH   	__class__s   &r   rV   ASGIRequest._get_schemes   s&    zz~~h'@@57+>+@@r   c                ^    \        V R 4      '       g   V P                  4        V P                  # _post)hasattr_load_post_and_filesr\   rP   s   &r   	_get_postASGIRequest._get_postv   s%    tW%%%%'zzr   c                    Wn         R # Nr[   )rH   posts   &&r   	_set_postASGIRequest._set_post{   s    
r   c                ^    \        V R 4      '       g   V P                  4        V P                  # )_files)r]   r^   rg   rP   s   &r   
_get_filesASGIRequest._get_files~   s%    tX&&%%'{{r   c                L    \        V P                  P                  R R4      4      # )r6   r   )r   rB   r   rP   s   &r   COOKIESASGIRequest.COOKIES   s    DIIMM-<==r   c                X   < \         SV `  4        V P                  P                  4        R # rb   )rU   closerG   rW   s   &r   rn   ASGIRequest.close   s    r   )rB   r\   r8   r9   rG   r!   r    r=   r:   r   r;   )__name__
__module____qualname____firstlineno____doc__body_receive_timeoutrM   r   rQ   rV   r_   rd   rh   propertyPOSTFILESrk   rn   __static_attributes____classdictcell____classcell__rX   __classdict__s   @@r   r   r   &   su      =#~ 4 4A

 Iy)DZ E> > r   r   c                      a a ] tR t^t oRt]tRtV 3R ltR t	R t
R tR tR tR tV 3R	 ltR
 t]R 4       tRtVtV ;t# )ASGIHandlerzHandler for ASGI requests.c                H   < \         SV `  4        V P                  R R7       R# )T)is_asyncN)rU   rM   load_middlewarerW   s   &r   rM   ASGIHandler.__init__   s    d+r   c                ,  "   VR,          R8w  d   \        RVR,          ,          4      h\        4       ;_uu_4       GRj  xL
  V P                  WV4      G Rj  xL
  RRR4      GRj  xL
  R#  L0 L L
  + GRj  xL 
 '       g   i     R# ; i5i)zF
Async entrypoint - parses the request and hands off to get_response.
typehttpz5Django can only handle ASGI/HTTP connections, not %s.N)
ValueErrorr   handle)rH   r   receivesends   &&&&r   __call__ASGIHandler.__call__   sk      =F"G%PV-W  *+++++ed333 ,++3 ,+++s_   >B A1BA7A3A7B*A5+B3A75B7B	=B >
B		B		Bc                (  a "    S P                  V4      G Rj  xL
 p\        \        T4      4       \        P
                  P                  S P                  TR7      G Rj  xL
  S P                  Y4      w  rVTfN   TP                  4        S P                  Yc4      G Rj  xL
  \        TP                  4      ! 4       G Rj  xL
  R# T 3R lp\        P                  ! S P                  T4      4      \        P                  ! T! YS4      4      .p\        P                  ! T\        P                   R7      G Rj  xL
  T FG  p	T	P#                  4       '       d    T	P%                  4        K,  T	P)                  4         T	G Rj  xL
  KI  	   T^,          P%                  4       p
\        T
P                  4      ! 4       G Rj  xL
  TP                  4        R#  EL  \         d     R# i ; i EL ELO EL0 L  \         d     K  \&         d    TP                  4        h i ; i L  \        P*                   d     K  i ; i L  \        P*                   d7    \        P,                  P                  S P                  R7      G Rj  xL 
   Li ; i5i)z;
Handles the ASGI request. Called via the __call__ method.
N)senderr   c                    <"   SP                  V 4      G R j  xL
 p SP                  W!4      G R j  xL
  V#  L  L  \        P                   d     T# i ; i5irb   )run_get_responsesend_responseasyncioCancelledError)requestr   responserH   s   && r   process_request+ASGIHandler.handle.<locals>.process_request   s]     !227;;H((888
 O <8)) O	s:   A9A= ;= A= AAAA)return_when)r   )	read_bodyr   r   r   r   request_startedasendrX   create_requestrn   r   r   r   create_tasklisten_for_disconnectwaitFIRST_COMPLETEDdoneresultAssertionErrorcancelr   request_finished)rH   r   r   r   rI   r   error_responser   taskstaskr   s   f&&&       r   r   ASGIHandler.handle   s    
	"nnW55I 	+E23%%++4>>+OOO"&"5"5e"G?OO$$^::: 4 45777	   : :7 CD >?
 ll5g.E.EFFFDyy{{KKM JJ &	2Qx(H  /111{ 6 		 	P
 ;7, 	G & % OO% --  2 %% 	H**000GGG	Hs  JG GG AJ G,!?J G/!!JG2A6J9G5:JG7*J=H&H$H&JI #J IJG G)%J(G))J/J2J5J7H!JH!H!!J$H&&H?;J>H??JAJJ	JJJJc                   "   V! 4       G Rj  xL
 pVR,          R8X  d   \        4       hQ RTR,          ,          4       h L15i)z&Listen for disconnect from the client.Nr   http.disconnectz+Invalid ASGI message after request body: %s)r   )rH   r   messages   && r   r   !ASGIHandler.listen_for_disconnect   s=     	/6?// ""UCgfoUUu	 "s   A?2Ac                   "   V P                  V4      G Rj  xL
 pV P                  Vn        \        V\        4      '       d   V P
                  Vn        V#  L>5i)zGet async response.N)get_response_asyncrX   _handler_classr?   r   
chunk_size
block_size)rH   r   r   s   && r   r   ASGIHandler.run_get_response   sK      0099"&.. h--"&//H :s   AA?Ac                  "   \         P                  ! \        P                  RR7      p V! 4       G Rj  xL
 pVR,          R8X  d   VP	                  4        \        4       hRV9   d]   \        VRR4      pV'       d0   \        VP                  RR	7      pV! VR,          4      G Rj  xL
  MVP                  VR,          4       VP                  R
R4      '       d   K   TP                  ^ 4       T#  L LM5i)z+Reads an HTTP body from an ASGI connection.zw+b)max_sizemodeNr   r   body_rolledF)thread_sensitive	more_body)tempfileSpooledTemporaryFiler   FILE_UPLOAD_MAX_MEMORY_SIZErn   r   getattrr   writer   seek)rH   r   rI   r   on_diskasync_writes   &&    r   r   ASGIHandler.read_body   s      1199
	 #IoGv"33!$&& !)Y>"/!).#K &gfo666OOGFO4 ;;{E22q+ & 7s(   2C6C2A1C6&C4'2C6C64C6c                     V P                  W4      R3#   \         d=    \        P                  R\        P
                  ! 4       RR/R7       R\        4       3u # \         d    R\        RRR7      3u # i ; i)	zq
Create the Request object and returns either (request, None) or
(None, response) if there is an error response.
Nz Bad Request (UnicodeDecodeError)status_codei  )exc_infoextraz413 Payload too largei  )status)	request_classUnicodeDecodeErrorloggerwarningsysr   r   r	   r   )rH   r   rI   s   &&&r   r   ASGIHandler.create_request  s    

	K%%e7==! 	2NN2$c*  
 /111  	K&=cJJJ	Ks    AA7A7$A76A7c                   <  \         SV `  WV4      #   \         d<    \        \        P
                  '       d   \        P                  ! 4       MRRR7      u # i ; i)z#Last-chance handler for exceptions.zInternal Server Errorz
text/plain)content_type)rU   handle_uncaught_exception	Exceptionr   r   DEBUG	traceback
format_exc)rH   r   resolverr   rX   s   &&&&r   r   %ASGIHandler.handle_uncaught_exception/  sP    	74WQQ 	**2...	$$&>U) 	s    AAAc                  "   . pVP                  4        Fx  w  rE\        V\        4      '       d   VP                  R4      p\        V\        4      '       d   VP                  R4      pVP	                  \        V4      \        V4      34       Kz  	  VP                  P                  4        F3  pVP	                  RVP                  4       P                  R4      34       K5  	  V! RRRVP                  RV/4      G Rj  xL
  VP                  '       dd   \        \        V4      4      ;_uu_4       GRj  xL
 pV  Rj  xL
  pV P                  V4       F  w  rV! RR	R
V	RR/4      G Rj  xL
  K  	  K<  V P                  VP                  4       F   w  rV! RR	R
V	RV'       * /4      G Rj  xL
  K"  	  R#  L L L| LQDRRR4      GRj  xL 
  M  + GRj  xL 
 '       g   i     M; iT! RR	/4      G Rj  xL 
  R#  LV5i)z)Encode and send a response out over ASGI.asciir1   s
   Set-Cookier   zhttp.response.startr   r0   Nzhttp.response.bodyr   r   T)itemsr?   rC   encodeappendr@   cookiesvaluesOutputStringr   	streamingr   aiterchunk_bytescontent)rH   r   r   response_headersheaderrK   cr   partchunkr5   lasts   &&&         r   r   ASGIHandler.send_response;  s     %^^-MF&#&&w/%%%X.##U6]E%L$AB . !!((*A##]ANN4D4K4KG4T$UV + -(..+
 	
 	
 
  h000G")  $$($4$4T$:" &(< & !,T	 	 	 %;   $//0@0@A 4#X    B?	
 1	 #* 100000  45666
s   C;H=F8>H H4F:5H8G;G ?F<
 G )G,F>-
G76H-H.H:H<G >G GHGHG,	G
G,	%G,	'H<G?=Hc              #     "   ^ pV'       g	   VR3x  R# V\        V4      8  dI   WW P                  ,            W P                  ,           \        V4      8  3x  W P                  ,          pKX  R# 5i)zg
Chunks some data up so it can be sent in reasonable size messages.
Yields (chunk, last_chunk) tuples.
TN)lenr   )clsdatapositions   && r   r   ASGIHandler.chunk_bytesq  sg      *T">> 9:NN*s4y8  &H #s   A-A/ i   )rp   rq   rr   rs   rt   r   r   r   rM   r   r   r   r   r   r   r   r   classmethodr   ry   rz   r{   r|   s   @@r   r   r      s]     $MJ,4CJV	<K"
4l ' ' 'r   r   )%r   loggingr   r   r   
contextlibr   asgiref.syncr   r   django.confr   django.corer   django.core.exceptionsr   r	   django.core.handlersr
   django.httpr   r   r   r   r   r   r   django.urlsr   django.utils.functionalr   	getLoggerr   r   r   BaseHandlerr   r   r   r   <module>r      sv      
    >    D %   * 3			+	,,f+ fRq'$"" q'r   