+
    XjS?                       ^ RI Ht ^ RI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!OtR
P$                  ! ]P&                  !  t]P*                  P-                  RR] R] 24      t]P*                  P-                  RR] R] 24      t]! ]P*                  P-                  RR4      4      t]! ]P*                  P-                  RR4      4      t]! ]P*                  P-                  RR4      4      tR R lt]P<                  ! R4      t]P<                  ! R4      t ]PB                   ! R R4      4       t"]PB                   ! R R	4      4       t#R R lt$R R lt%R R  lt&R# )"    )annotationsN)	Generator)Callable)Headers)SecurityError)versionRequestResponsez{}.{}WEBSOCKETS_USER_AGENTzPython/z websockets/WEBSOCKETS_SERVERWEBSOCKETS_MAX_NUM_HEADERS128WEBSOCKETS_MAX_LINE_LENGTH8192WEBSOCKETS_MAX_BODY_SIZE	1_048_576c                    V ^8  d   QhRRRR/# )   valuebytes | bytearrayreturnstr )formats   "m   /Users/wind/Downloads/Coruna-main学习资料A/backend/venv/lib/python3.14/site-packages/websockets/http11.py__annotate__r   2   s     3 3 33 3    c                &    V P                  RR7      # )z?
Decode a bytestring for interpolating into an error message.

backslashreplaceerrors)decode)r   s   &r   dr#   2   s    
 <<1<22r   s   [-!#$%&\'*+.^_`|~0-9a-zA-Z]+s   [\x09\x20-\x7e\x80-\xff]*c                  v    ] tR t^Nt$ RtR]R&   R]R&   RtR]R&   ]R	 R
 l4       t]	R R l4       t
R R ltRtR# )r	   z{
WebSocket handshake request.

Attributes:
    path: Request path, including optional query.
    headers: Request headers.
r   pathr   headersNException | None
_exceptionc                   V ^8  d   QhRR/# r   r   r'   r   )r   s   "r   r   Request.__annotate___   s      + r   c                	P    \         P                  ! R \        4       V P                  # )zIRequest.exception is deprecated; use ServerProtocol.handshake_exc insteadwarningswarnDeprecationWarningr(   selfs   &r   	exceptionRequest.exception^   s     W	
 r   c                    V ^8  d   QhRRRR/# )r   	read_line9Callable[[int], Generator[None, None, bytes | bytearray]]r   zGenerator[None, None, Request]r   )r   s   "r   r   r+   g   s"     C" C"LC" 
(C"r   c              #  8  "    \        V4       Rj  xL
 p TP                  R^4      w  rEpTR8w  d   \        R\	        T4       24      hTR8w  d   \        R\	        T4       24      hTP                  R	4      p\        T4       Rj  xL
 pR
T9   d   \        R4      hRT9   d#   \        TR,          4      ^ 8w  d   \        R4      hT ! Yx4      #  L  \         d   p\        R4      ThRp?ii ; i  \         d    \        R\	        T4       24      Rhi ; i L5i)a)  
Parse a WebSocket handshake request.

This is a generator-based coroutine.

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

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

:meth:`parse` 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 the data stream after :meth:`parse` returns.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated
        line or raises an exception if there isn't enough data

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    zinvalid HTTP request line:    HTTP/1.1)unsupported protocol; expected HTTP/1.1: s   GETz+unsupported HTTP method; expected GET; got asciiTransfer-Encodingz!transfer codings aren't supportedContent-Lengthzunsupported request body)	
parse_lineEOFErrorsplit
ValueErrorr#   r"   parse_headersNotImplementedErrorint)	clsr6   request_lineexcmethodraw_pathprotocolr%   r&   s	   &&       r   parseRequest.parsef   s=    F	Y&0&;;L	X)5););D!)D&Fh {";AlO;LM  VJ1V9+VWW w'*955 ')%&IJJw& 7+,-2 !;<<4!!A < 	YNOUXX	Y
  	X:1\?:KLMSWW	X 6sV   DC CC C1 ADD	ADC C.C))C..D1$DDc                   V ^8  d   QhRR/# r   r   bytesr   )r   s   "r   r   r+      s     	 	5 	r   c                    RV P                    R2P                  4       pWP                  P                  4       ,          pV# )z+
Serialize a WebSocket handshake request.

zGET z HTTP/1.1
)r%   encoder&   	serialize)r2   requests   & r   rS   Request.serialize   s9     =188:<<))++r   r   )__name__
__module____qualname____firstlineno____doc____annotations__r(   propertyr3   classmethodrL   rS   __static_attributes__r   r   r   r	   r	   N   sT     I $(J '  C" C"J	 	r   c                      ] tR t^t$ RtR]R&   R]R&   R]R&   RtR	]R
&   RtR]R&   ]R R l4       t	]
RR R ll4       tR R ltRtR# )r
   z
WebSocket handshake response.

Attributes:
    status_code: Response code.
    reason_phrase: Response reason.
    headers: Response headers.
    body: Response body.

rE   status_coder   reason_phraser   r&   r   r   bodyNr'   r(   c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   Response.__annotate__   s      + r   c                	P    \         P                  ! R \        4       V P                  # )zJResponse.exception is deprecated; use ClientProtocol.handshake_exc insteadr-   r1   s   &r   r3   Response.exception   s"    7	

 r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   r6   r7   
read_exactread_to_eofproxyboolr   zGenerator[None, None, Response]r   )r   s   "r   r   rd      sE     O7 O7LO7 NO7 O	O7
 O7 
)O7r   c              #  6  "    \        V4       Rj  xL
 p TP                  R^4      w  rxp	T'       d    TR9  d   \        R\	        T4       24      hMTR8w  d   \        R\	        T4       24      h \        T4      p
^dT
u;8:  d   R	8  g   M \        R
\	        T4       24      h\        P                  T	4      '       g   \        R\	        T	4       24      hT	P                  R4      p\        T4       Rj  xL
 pT'       d   RpM\        YYT4       Rj  xL
 pT ! YY4      #  EL  \         d   p\        R4      ThRp?ii ; i  \         d    \        R\	        T4       24      Rhi ; i  \         d    \        R\	        T4       24      Rhi ; i L L5i)a:  
Parse a WebSocket handshake response.

This is a generator-based coroutine.

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

Args:
    read_line: Generator-based coroutine that reads a LF-terminated
        line or raises an exception if there isn't enough data.
    read_exact: Generator-based coroutine that reads the requested
        bytes or raises an exception if there isn't enough data.
    read_to_eof: Generator-based coroutine that reads until the end
        of the stream.

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

Nz0connection closed while reading HTTP status liner9   zinvalid HTTP status line: r:   z5unsupported protocol; expected HTTP/1.1 or HTTP/1.0: r;   z+invalid status code; expected integer; got iX  u-   invalid status code; expected 100–599; got zinvalid HTTP reason phrase: 
iso-8859-1r   )r:   s   HTTP/1.0)r?   r@   rA   rB   r#   rE   	_value_re	fullmatchr"   rC   	read_body)rF   r6   rh   ri   rj   status_linerH   rK   raw_status_code
raw_reasonr`   reasonr&   rb   s   &&&&&         r   rL   Response.parse   s    B	X%/	%::K	V4?4E4EdA4N1Hz 99 K~&(  : ;& ?+?OP 	o.K
 k'C'?/@R?ST  "":..;AjM?KLL ""<0*955 D'i[ D ;66] ; 	XMNTWW	X
  	V9!K.9IJKQUU	V  	=a>P=QR	 6s   FD( D%D( E F=F3E. >AF6F7F8FFFF%D( (E3D??EF$E++F.$FFFc                   V ^8  d   QhRR/# rO   r   )r   s   "r   r   rd   '  s     
 
5 
r   c                    RV P                    RV P                   R2P                  4       pWP                  P	                  4       ,          pWP
                  ,          pV# )z,
Serialize a WebSocket handshake response.

z	HTTP/1.1  z
)r`   ra   rR   r&   rS   rb   )r2   responses   & r   rS   Response.serialize'  sU     t//0$2D2D1ETJQQSLL**,,IIr   r   )F)rV   rW   rX   rY   rZ   r[   rb   r(   r\   r3   r]   rL   rS   r^   r   r   r   r
   r
      sd    	 !D
!#'J '  O7 O7b
 
r   c                    V ^8  d   QhRRRR/# )r   r6   r7   r   (Generator[None, None, bytes | bytearray]r   )r   s   "r   r   r   4  s      H-r   c              #     "    V ! \         4       Rj  xL
 pTP                  R4      '       g   \	        R4      hTRR #  L+  \         d    \        R4      hi ; i5i)aK  
Parse a single line.

CRLF is stripped from the return value.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

Raises:
    EOFError: If the connection is closed without a CRLF.
    SecurityError: If the response exceeds a security limit.

Nzline too long   
zline without CRLF)MAX_LINE_LENGTHRuntimeErrorr   endswithr@   )r6   lines   & r   r?   r?   4  s^     "-#O44 ==!!*++9 5 -O,,-s.   AA ?A AAA AAc                    V ^8  d   QhRRRR/# )r   r6   r7   r   zGenerator[None, None, Headers]r   )r   s   "r   r   r   O  s     5 5H5#5r   c              #    "   \        4       p\        \        ^,           4       F  p \        V 4       Rj  xL
 pTR8X  d    T#  TP                  R^4      w  rV\        P                  T4      '       g   \        R\        T4       24      hTP                  R4      p\        P                  T4      '       g   \        R\        T4       24      hTP                  R	4      pTP                  R
4      pTP                  Yx4       K  	  \        R4      h L  \         d   p\	        R4      ThRp?ii ; i  \         d    \        R\        T4       24      Rhi ; i5i)a  
Parse HTTP headers.

Non-ASCII characters are represented with surrogate escapes.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

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

Nz,connection closed while reading HTTP headersr      :zinvalid HTTP header line: zinvalid HTTP header name: s    	zinvalid HTTP header value: r<   rm   ztoo many HTTP headers)r   rangeMAX_NUM_HEADERSr?   r@   rA   rB   r#   	_token_rero   striprn   r"   set_insecurer   )	r6   r&   _r   rH   raw_name	raw_valuenamer   s	   &        r   rC   rC   O  sO    , iG?Q&'	T(33D 3;0 N-	O"&**T1"5H ""8,,9!H+GHHOOF+	""9--:1Y<.IJJw'   . 	T)3 (8 3445 4 	TIJPSS	T  	O9!D'CD$N	Os]   $EDDD
ED1E4AE7AEDD.D))D..E1$EEc               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   r`   rE   r&   r   r6   r7   rh   ri   r   r|   r   )r   s   "r   r   r     sO     :O :O:O:O I:O J	:O
 K:O .:Or   c              #    "   ^dT u;8:  d   ^8  g   M V ^8X  g   V R8X  d   R# VP                  R4      ;pEe   VR8w  d   \        RV R24      hRp \        V4       Rj  xL
 pVP                  R^4      ^ ,          p\	        V4      ^8  d"   VP                  R	R
7      p	\        RV	 R24      h\        V^4      p
V
^ 8X  d   Mn\	        V4      V
,           \        8  d   \        RV
 R\	        V4       R24      hYc! V
4       Rj  xL
 ,          pV! ^4       Rj  xL
 R8w  g   K  \        R4      h\        V4       Rj  xL
  V# VP                  R4      ;peU   \	        V4      ^8  d   \        RV R24      h\        V4      pV\        8  d   \        RV R24      hV! V4       Rj  xL
 #  V! \        4       Rj  xL
 #  ELd L L L L" L  \         d    \        R\         R24      hi ; i5i)d   i0  r   r=   Nchunkedztransfer coding z isn't supported   ;r   r    zchunk too large: 0xz byteszchunk too large: z bytes after r~   zchunk without CRLFr>   zbody too large: zbody too large: over )getrD   r?   rA   lenr"   r   rE   MAX_BODY_SIZErB   rC   r   )r`   r&   r6   rh   ri   codingrb   chunk_size_lineraw_chunk_sizestr_chunk_size
chunk_sizeraw_content_lengthcontent_lengths   &&&&&        r   rp   rp     s     kC;##59K KK 34
4&	AY%(8@P&QRR)3I)>>O,224;A>N>"R'!/!6!6>P!6!Q#&9.9I$PQQ^R0JQ4y:%5#'
|=T6R  z*555D%a=(W4 !566 +++ ',< =
=
	J!"R'"23E2Ff MNN/0M)"2>2B& IJJ%n556	O*=99:? ? 6( 	, 6 : 	O"7f MNN	Os   AG4!G"B#G4GG4G
G4'G4 GA*G4+G,G41G  GG G4G4
G4G4G4G G11G4)SERVER
USER_AGENTr	   r
   )'
__future__r   dataclassesosresysr.   collections.abcr   typingr   datastructuresr   
exceptionsr   r   websockets_version__all__r   version_infoPYTHON_VERSIONenvironr   r   r   rE   r   r   r   r#   compiler   rn   	dataclassr	   r
   r?   rC   rp   r   r   r   <module>r      si   "  	 	 
  %  # % 2 !1!12 ZZ^^n\*<)=>
 
n\*<)=>
 bjjnn%A5IJ bjjnn%A6JK BJJNN#={KL3 JJ78	 JJ45	 f f fR x x xv65p:Or   