
    0h$                        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  \R$                  (       a  S SKJr   " S S\	5      r " S S\5      r
g)    )annotationsN)
BadRequest)HTTPException)Request)Response   )json)current_app)_split_blueprint_path)Rulec                    ^  \ rS rSr% Sr\rS\S'   SrS\S'   Sr	S\S	'   Sr
S
\S'   SrS\S'   SrS\S'   SrS\S'   \SU 4S jj5       r\R                   SS j5       r\SU 4S jj5       r\R                   SS j5       r\SU 4S jj5       r\R                   SS j5       r\SS j5       r\SS j5       r\SS j5       rS U 4S jjrS!U 4S jjrSrU =r$ )"r      a  The request object used by default in Flask.  Remembers the
matched endpoint and view arguments.

It is what ends up as :class:`~flask.request`.  If you want to replace
the request object used you can subclass this and set
:attr:`~flask.Flask.request_class` to your subclass.

The request object is a :class:`~werkzeug.wrappers.Request` subclass and
provides all of the attributes Werkzeug defines plus a few Flask
specific ones.
t.Anyjson_moduleNzRule | Noneurl_rulezdict[str, t.Any] | None	view_argszHTTPException | Nonerouting_exception
int | None_max_content_length_max_form_memory_size_max_form_partsc                   > U R                   b  U R                   $ [        (       d
  [        TU ]  $ [        R                  S   $ )a?  The maximum number of bytes that will be read during this request. If
this limit is exceeded, a 413 :exc:`~werkzeug.exceptions.RequestEntityTooLarge`
error is raised. If it is set to ``None``, no limit is enforced at the
Flask application level. However, if it is ``None`` and the request has
no ``Content-Length`` header and the WSGI server does not indicate that
it terminates the stream, then no data is read to avoid an infinite
stream.

Each request defaults to the :data:`MAX_CONTENT_LENGTH` config, which
defaults to ``None``. It can be set on a specific ``request`` to apply
the limit to that specific view. This should be set appropriately based
on an application's or view's specific needs.

.. versionchanged:: 3.1
    This can be set per-request.

.. versionchanged:: 0.6
    This is configurable through Flask config.
MAX_CONTENT_LENGTH)r   r
   supermax_content_lengthconfigself	__class__s    F/var/www/auris/envauris/lib/python3.13/site-packages/flask/wrappers.pyr   Request.max_content_length;   s?    * ##/+++{7--!!"677    c                    Xl         g N)r   r   values     r    r   r!   X   s    #( r"   c                   > U R                   b  U R                   $ [        (       d
  [        TU ]  $ [        R                  S   $ )a`  The maximum size in bytes any non-file form field may be in a
``multipart/form-data`` body. If this limit is exceeded, a 413
:exc:`~werkzeug.exceptions.RequestEntityTooLarge` error is raised. If it
is set to ``None``, no limit is enforced at the Flask application level.

Each request defaults to the :data:`MAX_FORM_MEMORY_SIZE` config, which
defaults to ``500_000``. It can be set on a specific ``request`` to
apply the limit to that specific view. This should be set appropriately
based on an application's or view's specific needs.

.. versionchanged:: 3.1
    This is configurable through Flask config.
MAX_FORM_MEMORY_SIZE)r   r
   r   max_form_memory_sizer   r   s    r    r)   Request.max_form_memory_size\   s?     %%1---{7//!!"899r"   c                    Xl         g r$   )r   r%   s     r    r)   r*   s   s    %*"r"   c                   > U R                   b  U R                   $ [        (       d
  [        TU ]  $ [        R                  S   $ )aP  The maximum number of fields that may be present in a
``multipart/form-data`` body. If this limit is exceeded, a 413
:exc:`~werkzeug.exceptions.RequestEntityTooLarge` error is raised. If it
is set to ``None``, no limit is enforced at the Flask application level.

Each request defaults to the :data:`MAX_FORM_PARTS` config, which
defaults to ``1_000``. It can be set on a specific ``request`` to apply
the limit to that specific view. This should be set appropriately based
on an application's or view's specific needs.

.. versionchanged:: 3.1
    This is configurable through Flask config.
MAX_FORM_PARTS)r   r
   r   max_form_partsr   r   s    r    r.   Request.max_form_partsw   s?     +'''{7))!!"233r"   c                    Xl         g r$   )r   r%   s     r    r.   r/      s    $r"   c                J    U R                   b  U R                   R                  $ g)zThe endpoint that matched the request URL.

This will be ``None`` if matching failed or has not been
performed yet.

This in combination with :attr:`view_args` can be used to
reconstruct the same URL or a modified URL.
N)r   endpoint)r   s    r    r2   Request.endpoint   s!     ==$==)))r"   c                V    U R                   nUb  SU;   a  UR                  S5      S   $ g)a2  The registered name of the current blueprint.

This will be ``None`` if the endpoint is not part of a
blueprint, or if URL matching failed or has not been performed
yet.

This does not necessarily match the name the blueprint was
created with. It may have been nested, or registered with a
different name.
N.r   )r2   
rpartition)r   r2   s     r    	blueprintRequest.blueprint   s2     ==C8O&&s+A..r"   c                :    U R                   nUc  / $ [        U5      $ )zThe registered names of the current blueprint upwards through
parent blueprints.

This will be an empty list if there is no current blueprint, or
if URL matching failed.

.. versionadded:: 2.0.1
)r7   r   )r   names     r    
blueprintsRequest.blueprints   s"     ~~<I$T**r"   c                   > [         TU ]  5         [        (       aH  [        R                  (       a2  U R                  S:w  a!  U R
                  (       d  SSKJn  U" U 5        g g g g g )Nzmultipart/form-datar   )attach_enctype_error_multidict)r   _load_form_datar
   debugmimetypefilesdebughelpersr>   )r   r>   r   s     r    r?   Request._load_form_data   sQ    !
 K!!!66JJD*40	  7 " r"   c                   >  [         TU ]  U5      $ ! [         a1  n[        (       a  [        R                  (       a  e [        5       UeS nAff = fr$   )r   on_json_loading_failedr   r
   r@   )r   eebrr   s      r    rF   Request.on_json_loading_failed   sB    	(71!44 	({{00,C'		(s    
A,AA)r   r   r   )returnr   )r&   r   rJ   None)rJ   
str | None)rJ   z	list[str])rJ   rK   )rG   zValueError | NonerJ   r   )__name__
__module____qualname____firstlineno____doc__r	   r   __annotations__r   r   r   r   r   r   propertyr   setterr)   r.   r2   r7   r;   r?   rF   __static_attributes____classcell__r   s   @r    r   r      s.   
 K !Hk  *.I&- /3+2&**(,:,"&OZ&8 88 ) ) : :,   + !+ 4 4, % %    $ + + 1( (r"   r   c                  R   ^  \ rS rSr% SrSrS\S'   \rSr	\
S	U 4S jj5       rSrU =r$ )
r      a  The response object that is used by default in Flask.  Works like the
response object from Werkzeug but is set to have an HTML mimetype by
default.  Quite often you don't have to create this object yourself because
:meth:`~flask.Flask.make_response` will take care of that for you.

If you want to replace the response object used you can subclass this and
set :attr:`~flask.Flask.response_class` to your subclass.

.. versionchanged:: 1.0
    JSON support is added to the response, like the request. This is useful
    when testing to get the test client response data as JSON.

.. versionchanged:: 1.0

    Added :attr:`max_cookie_size`.
z	text/htmlrL   default_mimetypeFc                T   > [         (       a  [         R                  S   $ [        TU ]  $ )zRead-only view of the :data:`MAX_COOKIE_SIZE` config key.

See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in
Werkzeug's docs.
MAX_COOKIE_SIZE)r
   r   r   max_cookie_sizer   s    r    r]   Response.max_cookie_size   s)     ;%%&788 w&&r"    )rJ   int)rM   rN   rO   rP   rQ   rZ   rR   r	   r   autocorrect_location_headerrS   r]   rU   rV   rW   s   @r    r   r      s2    " $/j.K"'
' 
'r"   r   )
__future__r   typingtwerkzeug.exceptionsr   r   werkzeug.wrappersr   RequestBaser   ResponseBase r	   globalsr
   helpersr   TYPE_CHECKINGwerkzeug.routingr   r_   r"   r    <module>rn      sE    "  * - 4 6    *??%I(k I(X#'| #'r"   