Ë
    ëO´j•  ã                  ó@  — d dl mZ d dlZd dlZd dlZddlmZ ddlmZ ddgZ	 e
ej                  j                  dd	«      «      Z e
ej                  j                  d
d«      «      Zdd„Z ej                   d«      Z ej                   d«      Zdd„Zdd„Zdd„Zdd„Zy)é    )ÚannotationsNé   )ÚHeaders)ÚSecurityErrorÚread_requestÚread_responseÚWEBSOCKETS_MAX_NUM_HEADERSÚ128ÚWEBSOCKETS_MAX_LINE_LENGTHÚ8192c                ó&   — | j                  d¬«      S )zG
    Decode a bytestring for interpolating into an error message.

    Úbackslashreplace)Úerrors)Údecode)Úvalues    úm/var/www/origus_pro_usr/data/www/origus.pro/core/.venv/lib/python3.12/site-packages/websockets/legacy/http.pyÚdr      s   € ð
 �<‰<Ð1ˆ<Ó2Ð2ó    s   [-!#$%&\'*+.^_`|~0-9a-zA-Z]+s   [\x09\x20-\x7e\x80-\xff]*c              ƒ  ó®  K  — 	 t        | «      ƒ d{  –—† }	 |j                  dd«      \  }}}|dk7  rt        dt	        |«      › �«      ‚|dk7  rt        d	t	        |«      › �«      ‚|j                  d
d«      }t        | «      ƒ d{  –—† }||fS 7 Œ|# t        $ r}t        d«      |‚d}~ww xY w# t        $ r t        dt	        |«      › �«      d‚w xY w7 ŒL­w)aó  
    Read an HTTP/1.1 GET request and return ``(path, headers)``.

    ``path`` isn't URL-decoded or validated in any way.

    ``path`` and ``headers`` are expected to contain only ASCII characters.
    Other characters are represented with surrogate escapes.

    :func:`read_request` doesn't attempt to read the request body because
    WebSocket handshake requests don't have one. If the request contains a
    body, it may be read from ``stream`` after this coroutine returns.

    Args:
        stream: Input to read the request from.

    Raises:
        EOFError: If the connection is closed without a full HTTP request.
        SecurityError: If the request exceeds a security limit.
        ValueError: If the request isn't well formatted.

    Nz1connection closed while reading HTTP request lineó    r   zinvalid HTTP request line: s   GETzunsupported HTTP method: ó   HTTP/1.1úunsupported HTTP version: ÚasciiÚsurrogateescape)Ú	read_lineÚEOFErrorÚsplitÚ
ValueErrorr   r   Úread_headers)ÚstreamÚrequest_lineÚexcÚmethodÚraw_pathÚversionÚpathÚheaderss           r   r   r   -   s÷   è ø€ ð8UÜ& vÓ.×.ˆðTØ$0×$6Ñ$6°t¸QÓ$?Ñ!ˆ�˜'ð �ÒÜÐ4´Q°v³Y°KÐ@ÓAÐAØ�+ÒÜÐ5´a¸³j°\ÐBÓCÐCØ�?‰?˜7Ð$5Ó6€Dä  Ó(×(€Gà�ˆ=Ðð# /ùÜò UÜÐJÓKÐQTÐTûðUûô
 ò TÜÐ6´q¸³Ð6GÐHÓIÈtÐSðTúð )úsU   ‚C„B ’B“B ˜B. ®ACÂCÂCÂB Â	B+ÂB&Â&B+Â+CÂ."CÃCc              ƒ  óv  K  — 	 t        | «      ƒ d{  –—† }	 |j                  dd«      \  }}}|dk7  rt        dt	        |«      › �«      ‚	 t        |«      }d	|cxk  rd
k  sn t        dt	        |«      › �«      ‚t        j                  |«      st        dt	        |«      › �«      ‚|j                  «       }t        | «      ƒ d{  –—† }|||fS 7 Œ»# t        $ r}t        d«      |‚d}~ww xY w# t        $ r t        dt	        |«      › �«      d‚w xY w# t        $ r t        dt	        |«      › �«      d‚w xY w7 Œr­w)aÏ  
    Read an HTTP/1.1 response and return ``(status_code, reason, headers)``.

    ``reason`` and ``headers`` are expected to contain only ASCII characters.
    Other characters are represented with surrogate escapes.

    :func:`read_request` doesn't attempt to read the response body because
    WebSocket handshake responses don't have one. If the response contains a
    body, it may be read from ``stream`` after this coroutine returns.

    Args:
        stream: Input to read the response from.

    Raises:
        EOFError: If the connection is closed without a full HTTP response.
        SecurityError: If the response exceeds a security limit.
        ValueError: If the response isn't well formatted.

    Nz0connection closed while reading HTTP status liner   r   zinvalid HTTP status line: r   r   zinvalid HTTP status code: éd   iè  zunsupported HTTP status code: zinvalid HTTP reason phrase: )
r   r   r   r   r   ÚintÚ	_value_reÚ	fullmatchr   r   )	r    Ústatus_liner"   r%   Úraw_status_codeÚ
raw_reasonÚstatus_codeÚreasonr'   s	            r   r   r   ^   sc  è ø€ ð2TÜ% fÓ-×-ˆðRØ/:×/@Ñ/@ÀÀqÓ/IÑ,ˆ� *ð �+ÒÜÐ5´a¸³j°\ÐBÓCÐCðVÜ˜/Ó*ˆð �+Ô$ Ô$ÜÐ9¼!¸OÓ:LÐ9MÐNÓOÐOÜ×Ñ˜zÔ*ÜÐ7¼¸*»°ÐGÓHÐHØ×ÑÓ €Fä  Ó(×(€Gà˜ Ð'Ð'ð/ .ùÜò TÜÐIÓJÐPSÐSûðTûô
 ò RÜÐ5´a¸³nÐ5EÐFÓGÈTÐQðRûô ò VÜÐ5´a¸Ó6HÐ5IÐJÓKÐQUÐUðVúð )úsm   ‚D9„C ’C“C ˜C- ®D9ÁD ÁA.D9ÃD7Ã	D9ÃC Ã	C*ÃC%Ã%C*Ã*D9Ã-"DÄD9Ä"D4Ä4D9c              ƒ  óp  K  — t        «       }t        t        dz   «      D ]Å  }	 t        | «      ƒ d{  –—† }|dk(  r |S 	 |j                  dd«      \  }}t        j                  |«      st        dt        |«      › �«      ‚|j                  d«      }t        j                  |«      st        d	t        |«      › �«      ‚|j                  d
«      }|j                  d
d«      }|||<   ŒÇ t        d«      ‚7 ŒÀ# t        $ r}t	        d«      |‚d}~ww xY w# t        $ r t        dt        |«      › �«      d‚w xY w­w)zo
    Read HTTP headers from ``stream``.

    Non-ASCII characters are represented with surrogate escapes.

    é   Nz,connection closed while reading HTTP headersr   ó   :zinvalid HTTP header line: zinvalid HTTP header name: s    	zinvalid HTTP header value: r   r   ztoo many HTTP headers)r   ÚrangeÚMAX_NUM_HEADERSr   r   r   r   r   Ú	_token_rer,   Ústripr+   r   r   )	r    r'   Ú_Úliner"   Úraw_nameÚ	raw_valueÚnamer   s	            r   r   r   ’   sK  è ø€ ô ‹i€GÜ”? QÑ&Ó'ò 5ˆð	TÜ" 6Ó*×*ˆDð �3Š;Øð& €Nð#	OØ"&§*¡*¨T°1Ó"5ÑˆH�iô ×"Ñ" 8Ô,ÜÐ9¼!¸H»+¸ÐGÓHÐHØ—O‘O FÓ+ˆ	Ü×"Ñ" 9Ô-ÜÐ:¼1¸Y»<¸.ÐIÓJÐJà�‰˜wÓ'ˆØ× Ñ  Ð*;Ó<ˆØˆ�Šð)5ô. Ð3Ó4Ð4ð+ +ùÜò 	TÜÐIÓJÐPSÐSûð	Tûô ò 	OÜÐ9¼!¸D»'¸ÐCÓDÈ$ÐNð	OüsO   ‚ D6£C4±C2²C4¶D6¿DÁBD6Ã2C4Ã4	DÃ=D	Ä	DÄD6Ä"D3Ä3D6c              ƒ  óº   K  — | j                  «       ƒ d{  –—† }t        |«      t        kD  rt        d«      ‚|j	                  d«      st        d«      ‚|dd S 7 ŒB­w)z[
    Read a single line from ``stream``.

    CRLF is stripped from the return value.

    Nzline too longs   
zline without CRLFéþÿÿÿ)ÚreadlineÚlenÚMAX_LINE_LENGTHr   Úendswithr   )r    r:   s     r   r   r   º   sW   è ø€ ð —‘Ó"×"€Dä
ˆ4ƒy”?Ò"Ü˜OÓ,Ð,à�=‰=˜Ô!ÜÐ*Ó+Ð+Ø��ˆ9Ðð #ús   ‚A–A—AA)r   ÚbytesÚreturnÚstr)r    úasyncio.StreamReaderrE   ztuple[str, Headers])r    rG   rE   ztuple[int, str, Headers])r    rG   rE   r   )r    rG   rE   rD   )Ú
__future__r   ÚasyncioÚosÚreÚdatastructuresr   Ú
exceptionsr   Ú__all__r*   ÚenvironÚgetr6   rB   r   Úcompiler7   r+   r   r   r   r   © r   r   ú<module>rS      s™   ðÝ "ã Û 	Û 	å $Ý &ð ˜?Ð
+€á�b—j‘j—n‘nÐ%AÀ5ÓIÓJ€Ù�b—j‘j—n‘nÐ%AÀ6ÓJÓK€ó3ð ˆB�J‰JÐ7Ó8€	ð ˆB�J‰JÐ4Ó5€	ó.ób1(óh%ôPr   