
    %hxM                       S SK Jr  S SKrS SKJr  S SKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK J!r!  SSK"J#r#  SSK"J$r$  S S!KJ%r%  S S"K"J&r&  S S#K"J'r'  S S$K"J(r(   " S% S&5      r)g)'    )annotationsN)datetime)	parse_qsl   )Accept)Authorization)CharsetAccept)ETags)Headers)	HeaderSet)IfRange)ImmutableList)ImmutableMultiDict)LanguageAccept)
MIMEAccept)	MultiDict)Range)RequestCacheControl)parse_accept_header)parse_cache_control_header)
parse_date)parse_etags)parse_if_range_header)parse_list_header)parse_options_header)parse_range_header)parse_set_header)	UserAgent)cached_property)header_property   )parse_cookie)get_content_length)get_current_url)get_hostc                     \ rS rSr% Sr\rS\S'   \rS\S'   \	r
S\S'   \rS\S	'    S
rS\S'                     SBS jrSCS jr\SDS j5       r\SES j5       r\SCS j5       r\SFS j5       r\SCS j5       r\SCS j5       r\SCS j5       r\SCS j5       r\SCS j5       r\SGS j5       r\\   " SSSS9r\SHS j5       r\\   " SSSS9r \\   " S S!SS9r!\\   " S"S#SS9r"\" S$S
\#S%SS9r$\" S&S
\%S'SS9r&SIS( jr'\SCS) j5       r(\SJS* j5       r)\SKS+ j5       r*\SLS, j5       r+\SMS- j5       r,\SNS. j5       r-\SOS/ j5       r.\SPS0 j5       r/\SQS1 j5       r0\SQS2 j5       r1\SRS3 j5       r2\SRS4 j5       r3\SSS5 j5       r4\STS6 j5       r5\SUS7 j5       r6\SVS8 j5       r7\\   " S9S:SS9r8\" S;\9S<SS=9r:\\   " S>S?SS9r;\SFS@ j5       r<SAr=g
)WRequest'   a`  Represents the non-IO parts of a HTTP request, including the
method, URL info, and headers.

This class is not meant for general use. It should only be used when
implementing WSGI, ASGI, or another HTTP application spec. Werkzeug
provides a WSGI implementation at :cls:`werkzeug.wrappers.Request`.

:param method: The method the request was made with, such as
    ``GET``.
:param scheme: The URL scheme of the protocol the request used, such
    as ``https`` or ``wss``.
:param server: The address of the server. ``(host, port)``,
    ``(path, None)`` for unix sockets, or ``None`` if not known.
:param root_path: The prefix that the application is mounted under.
    This is prepended to generated URLs, but is not part of route
    matching.
:param path: The path part of the URL after ``root_path``.
:param query_string: The part of the URL after the "?".
:param headers: The headers received with the request.
:param remote_addr: The address of the client sending the request.

.. versionchanged:: 3.0
    The ``charset``, ``url_charset``, and ``encoding_errors`` attributes
    were removed.

.. versionadded:: 2.0
ztype[MultiDict[str, t.Any]]parameter_storage_classdict_storage_classztype[list[t.Any]]list_storage_classztype[UserAgent]user_agent_classNzlist[str] | Nonetrusted_hostsc	                    UR                  5       U l        X l        X0l        UR	                  S5      U l        SUR                  S5      -   U l        X`l        Xpl	        Xl
        g )N/)uppermethodschemeserverrstrip	root_pathlstrippathquery_stringheadersremote_addr)	selfr1   r2   r3   r5   r7   r8   r9   r:   s	            O/var/www/auris/envauris/lib/python3.13/site-packages/werkzeug/sansio/request.py__init__Request.__init__t   s]     lln   #))#. $++c**	 )&    c                     U R                   nS[        U 5      R                   SU< SU R                   S3$ ! [         a  nSU S3n S nAN?S nAff = f)Nz(invalid URL: )< z [z]>)url	Exceptiontype__name__r1   )r;   rD   es      r<   __repr__Request.__repr__   s\    	(((C 4:&&'qr$++bAA  	("1#Q'C	(s   8 
AAAc                f    U R                  [        U R                  R                  5       SSS95      $ )a  The parsed URL parameters (the part in the URL after the question
mark).

By default an
:class:`~werkzeug.datastructures.ImmutableMultiDict`
is returned from this function.  This can be changed by setting
:attr:`parameter_storage_class` to a different type.  This might
be necessary if the order of the form data is important.

.. versionchanged:: 2.3
    Invalid bytes remain percent encoded.
Tzwerkzeug.url_quote)keep_blank_valueserrors)r)   r   r8   decoder;   s    r<   argsRequest.args   s7     ++!!((*"&+
 	
r?   c                    SU R                   ;   a'  U R                  [        U R                   S   5      5      $ U R                  b  U R                  U R                  /5      $ U R                  5       $ )zmIf a forwarded header exists this is a list of all ip addresses
from the client ip to the last proxy server.
zX-Forwarded-For)r9   r+   r   r:   rO   s    r<   access_routeRequest.access_route   sl    
 ,**!$,,/@"AB  )**D,<,<+=>>&&((r?   c                T    U R                    SU R                  R                  5        3$ )z+Requested path, including the query string.?)r7   r8   rN   rO   s    r<   	full_pathRequest.full_path   s)     ))Ad//6689::r?   c                     U R                   S;   $ )zH``True`` if the request was made with a secure protocol
(HTTPS or WSS).
>   wsshttps)r2   rO   s    r<   	is_secureRequest.is_secure   s    
 {{...r?   c                    [        U R                  U R                  U R                  U R                  U R
                  5      $ )zNThe full request URL with the scheme, host, root path, path,
and query string.)r$   r2   hostr5   r7   r8   rO   s    r<   rD   Request.url   s2     KKDNNDIIt?P?P
 	
r?   c                n    [        U R                  U R                  U R                  U R                  5      $ )z.Like :attr:`url` but without the query string.)r$   r2   r_   r5   r7   rO   s    r<   base_urlRequest.base_url   s%     t{{DIIt~~tyyQQr?   c                X    [        U R                  U R                  U R                  5      $ )zeThe request URL scheme, host, and root path. This is the root
that the application is accessed from.
)r$   r2   r_   r5   rO   s    r<   root_urlRequest.root_url   s    
 t{{DIIt~~FFr?   c                B    [        U R                  U R                  5      $ )z%The request URL scheme and host only.)r$   r2   r_   rO   s    r<   host_urlRequest.host_url   s     t{{DII66r?   c                    [        U R                  U R                  R                  S5      U R                  U R
                  5      $ )zvThe host name the request was made to, including the port if
it's non-standard. Validated with :attr:`trusted_hosts`.
r_   )r%   r2   r9   getr3   r-   rO   s    r<   r_   Request.host   s7    
 KK))&14;;@R@R
 	
r?   c                |    SR                  U R                  R                  S5      5      n[        XR                  S9$ )zNA :class:`dict` with the contents of all cookies transmitted with
the request.;Cookie)cls)joinr9   getlistr"   r*   )r;   wsgi_combined_cookies     r<   cookiesRequest.cookies   s8      #xx(<(<X(FG &=&=
 	
r?   Content-TypezThe Content-Type entity-header field indicates the media
        type of the entity-body sent to the recipient or, in the case of
        the HEAD method, the media type that would have been sent had
        the request been a GET.T)doc	read_onlyc                z    [        U R                  R                  S5      U R                  R                  S5      S9$ )zThe Content-Length entity-header field indicates the size of the
entity-body in bytes or, in the case of the HEAD method, the size of
the entity-body that would have been sent had the request been a
GET.
zContent-LengthzTransfer-Encoding)http_content_lengthhttp_transfer_encoding)r#   r9   rk   rO   s    r<   content_lengthRequest.content_length  s7     " $ 0 01A B#'<<#3#34G#H
 	
r?   zContent-Encodinga  The Content-Encoding entity-header field is used as a
        modifier to the media-type. When present, its value indicates
        what additional content codings have been applied to the
        entity-body, and thus what decoding mechanisms must be applied
        in order to obtain the media-type referenced by the Content-Type
        header field.

        .. versionadded:: 0.9zContent-MD5a  The Content-MD5 entity-header field, as defined in
        RFC 1864, is an MD5 digest of the entity-body for the purpose of
        providing an end-to-end message integrity check (MIC) of the
        entity-body. (Note: a MIC is good for detecting accidental
        modification of the entity-body in transit, but is not proof
        against malicious attacks.)

        .. versionadded:: 0.9RefererzThe Referer[sic] request-header field allows the client
        to specify, for the server's benefit, the address (URI) of the
        resource from which the Request-URI was obtained (the
        "referrer", although the header field is misspelled).DatezThe Date general-header field represents the date and
        time at which the message was originated, having the same
        semantics as orig-date in RFC 822.

        .. versionchanged:: 2.0
            The datetime object is timezone-aware.
        zMax-ForwardszThe Max-Forwards request-header field provides a
        mechanism with the TRACE and OPTIONS methods to limit the number
        of proxies or gateways that can forward the request to the next
        inbound server.c                |    [        U S5      (       d+  [        U R                  R                  SS5      5      U l        g g )N_parsed_content_typerv    )hasattrr   r9   rk   r   rO   s    r<   _parse_content_typeRequest._parse_content_typeF  s6    t344(<  4)D% 5r?   c                \    U R                  5         U R                  S   R                  5       $ )zLike :attr:`content_type`, but without parameters (eg, without
charset, type etc.) and always lowercase.  For example if the content
type is ``text/HTML; charset=utf-8`` the mimetype would be
``'text/html'``.
r   )r   r   lowerrO   s    r<   mimetypeRequest.mimetypeL  s*     	  "((+1133r?   c                @    U R                  5         U R                  S   $ )zThe mimetype parameters as dict.  For example if the content
type is ``text/html; charset=utf-8`` the params would be
``{'charset': 'utf-8'}``.
r!   )r   r   rO   s    r<   mimetype_paramsRequest.mimetype_paramsV  s!     	  "((++r?   c                L    [        U R                  R                  SS5      5      $ )aB  The Pragma general-header field is used to include
implementation-specific directives that might apply to any recipient
along the request/response chain.  All pragma directives specify
optional behavior from the viewpoint of the protocol; however, some
systems MAY require that behavior be consistent with the directives.
Pragmar   )r   r9   rk   rO   s    r<   pragmaRequest.pragma_  s        0 02 >??r?   c                T    [        U R                  R                  S5      [        5      $ )z_List of mimetypes this client supports as
:class:`~werkzeug.datastructures.MIMEAccept` object.
r   )r   r9   rk   r   rO   s    r<   accept_mimetypesRequest.accept_mimetypesk  s     
 #4<<#3#3H#=zJJr?   c                T    [        U R                  R                  S5      [        5      $ )zaList of charsets this client supports as
:class:`~werkzeug.datastructures.CharsetAccept` object.
zAccept-Charset)r   r9   rk   r	   rO   s    r<   accept_charsetsRequest.accept_charsetsr  s!    
 #4<<#3#34D#E}UUr?   c                J    [        U R                  R                  S5      5      $ )zList of encodings this client accepts.  Encodings in a HTTP term
are compression encodings such as gzip.  For charsets have a look at
:attr:`accept_charset`.
zAccept-Encoding)r   r9   rk   rO   s    r<   accept_encodingsRequest.accept_encodingsy  s     #4<<#3#34E#FGGr?   c                T    [        U R                  R                  S5      [        5      $ )zList of languages this client accepts as
:class:`~werkzeug.datastructures.LanguageAccept` object.

.. versionchanged 0.5
   In previous versions this was a regular
   :class:`~werkzeug.datastructures.Accept` object.
zAccept-Language)r   r9   rk   r   rO   s    r<   accept_languagesRequest.accept_languages  s!     #4<<#3#34E#FWWr?   c                Z    U R                   R                  S5      n[        US[        5      $ )zgA :class:`~werkzeug.datastructures.RequestCacheControl` object
for the incoming cache control headers.
zCache-ControlN)r9   rk   r   r   )r;   cache_controls     r<   r   Request.cache_control  s(    
 ((9)-?RSSr?   c                J    [        U R                  R                  S5      5      $ )znAn object containing all the etags in the `If-Match` header.

:rtype: :class:`~werkzeug.datastructures.ETags`
zIf-Matchr   r9   rk   rO   s    r<   if_matchRequest.if_match  s     4<<++J788r?   c                J    [        U R                  R                  S5      5      $ )zsAn object containing all the etags in the `If-None-Match` header.

:rtype: :class:`~werkzeug.datastructures.ETags`
zIf-None-Matchr   rO   s    r<   if_none_matchRequest.if_none_match  s     4<<++O<==r?   c                J    [        U R                  R                  S5      5      $ )zThe parsed `If-Modified-Since` header as a datetime object.

.. versionchanged:: 2.0
    The datetime object is timezone-aware.
zIf-Modified-Sincer   r9   rk   rO   s    r<   if_modified_sinceRequest.if_modified_since  s     $,,**+>?@@r?   c                J    [        U R                  R                  S5      5      $ )zThe parsed `If-Unmodified-Since` header as a datetime object.

.. versionchanged:: 2.0
    The datetime object is timezone-aware.
zIf-Unmodified-Sincer   rO   s    r<   if_unmodified_sinceRequest.if_unmodified_since  s     $,,**+@ABBr?   c                J    [        U R                  R                  S5      5      $ )zxThe parsed ``If-Range`` header.

.. versionchanged:: 2.0
    ``IfRange.date`` is timezone-aware.

.. versionadded:: 0.7
zIf-Range)r   r9   rk   rO   s    r<   if_rangeRequest.if_range  s     %T\\%5%5j%ABBr?   c                J    [        U R                  R                  S5      5      $ )zcThe parsed `Range` header.

.. versionadded:: 0.7

:rtype: :class:`~werkzeug.datastructures.Range`
r   )r   r9   rk   rO   s    r<   rangeRequest.range  s     "$,,"2"27";<<r?   c                X    U R                  U R                  R                  SS5      5      $ )as  The user agent. Use ``user_agent.string`` to get the header
value. Set :attr:`user_agent_class` to a subclass of
:class:`~werkzeug.user_agent.UserAgent` to provide parsing for
the other properties or other extended data.

.. versionchanged:: 2.1
    The built-in parser was removed. Set ``user_agent_class`` to a ``UserAgent``
    subclass to parse data from the string.
z
User-Agentr   )r,   r9   rk   rO   s    r<   
user_agentRequest.user_agent  s&     $$T\\%5%5lB%GHHr?   c                `    [         R                  " U R                  R                  S5      5      $ )a  The ``Authorization`` header parsed into an :class:`.Authorization` object.
``None`` if the header is not present.

.. versionchanged:: 2.3
    :class:`Authorization` is no longer a ``dict``. The ``token`` attribute
    was added for auth schemes that use a token instead of parameters.
r   )r   from_headerr9   rk   rO   s    r<   authorizationRequest.authorization  s$     (()9)9/)JKKr?   OriginzThe host that the request originated from. Set :attr:`~CORSResponseMixin.access_control_allow_origin` on the response to indicate which origins are allowed.zAccess-Control-Request-HeaderszSent with a preflight request to indicate which headers will be sent with the cross origin request. Set :attr:`~CORSResponseMixin.access_control_allow_headers` on the response to indicate which headers are allowed.)	load_funcrw   rx   zAccess-Control-Request-MethodzSent with a preflight request to indicate which method will be used for the cross origin request. Set :attr:`~CORSResponseMixin.access_control_allow_methods` on the response to indicate which methods are allowed.c                    U R                   nUS:H  =(       d)    UR                  S5      =(       a    UR                  S5      $ )zrCheck if the mimetype indicates JSON data, either
:mimetype:`application/json` or :mimetype:`application/*+json`.
zapplication/jsonzapplication/z+json)r   
startswithendswith)r;   mts     r<   is_jsonRequest.is_json  s=    
 ]]$$ %}}^, %G$	
r?   )	r   r9   r1   r7   r8   r:   r5   r2   r3   )r1   strr2   r   r3   ztuple[str, int | None] | Noner5   r   r7   r   r8   bytesr9   r   r:   z
str | NonereturnNone)r   r   )r   zMultiDict[str, str])r   z	list[str])r   bool)r   zImmutableMultiDict[str, str])r   z
int | None)r   r   )r   zdict[str, str])r   r   )r   r   )r   r	   )r   r   )r   r   )r   r   )r   r
   )r   zdatetime | None)r   r   )r   zRange | None)r   r   )r   zAuthorization | None)>rG   
__module____qualname____firstlineno____doc__r   r)   __annotations__r*   r   r+   r   r,   r-   r=   rI   r   rP   rS   rW   propertyr\   rD   rb   re   rh   r_   rt   r    r   content_typer|   content_encodingcontent_md5referrerr   dateintmax_forwardsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   originr   access_control_request_headersaccess_control_request_methodr   __static_attributes__ r?   r<   r'   r'   '   s   F <N8M 7I3H -:)9(1o1& '+M#*'' ' .	'
 ' ' ' '  ' 
'BB 
 
* 
) 
) ; ; / / 
 
 R R G G 7 7 
 
 
 
 #3'# L 	
 	
 's+!  "#&! K s#A H  D # 	L 4 4 , , @ @ K K V V H H X X T T 9 9 > > A A C C C C = = 
I 
I L L S!C F &5("F
 
&" %4C$8'F
 	%! 	
 	
r?   r'   )*
__future__r   typingtr   urllib.parser   datastructuresr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   httpr   r   r   r   r   r   r   r   r   r   r   utilsr   r    r"   r#   r$   r%   r'   r   r?   r<   <module>r      sw    "   " # * * " $ & $ * / + ' & " 0 & -   ( $ ' % # " # #  % " o
 o
r?   