%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
a
�_g] � @ s� d dl mZ d dlZd dlmZ ddlmZ ddlm Z ddl
mZ dd d
d�dd
�Zddddddd�dd�Z
dddddddd�dd�Zddddd�dd�ZdS )� )�annotationsN)�quote� )�
_plain_int)�
SecurityError)�
uri_to_iriz
str | Nonezt.Iterable[str]�bool)�hostname�trusted_list�returnc C s� | sdS z| � d�d �d��d�} W n ty: Y dS 0 t|t�rL|g}|D ]|}|�d�rp|dd� }d }nd}z|� d�d �d��d�}W n ty� Y dS 0 || ks�|rP| �d|� ��rP d S qPdS )
z�Check if a host matches a list of trusted names.
:param hostname: The name to check.
:param trusted_list: A list of valid names to match. If a name
starts with a dot it will match all subdomains.
.. versionadded:: 0.9
F�:r �idna�ascii�.� NT)� partition�encode�decode�UnicodeEncodeError�
isinstance�str�
startswith�endswith)r r
�refZsuffix_match� r �B/vddos/python/lib/python3.9/site-packages/werkzeug/sansio/utils.py�host_is_trusted s(
r r ztuple[str, int | None] | Nonezt.Iterable[str] | None)�scheme�host_header�server�
trusted_hostsr c C s� d}|dur|}n.|dur@|d }|d dur@|� d|d � �}| dv r`|� d�r`|dd� }n| d v r~|� d
�r~|dd� }|dur�t||�s�td|�d
���|S )a$ Return the host for the given parameters.
This first checks the ``host_header``. If it's not present, then
``server`` is used. The host will only contain the port if it is
different than the standard port for the protocol.
Optionally, verify that the host is trusted using
:func:`host_is_trusted` and raise a
:exc:`~werkzeug.exceptions.SecurityError` if it is not.
:param scheme: The protocol the request used, like ``"https"``.
:param host_header: The ``Host`` header value.
:param server: Address of the server. ``(host, port)``, or
``(path, None)`` for unix sockets.
:param trusted_hosts: A list of trusted host names.
:return: Host, with port if necessary.
:raise ~werkzeug.exceptions.SecurityError: If the host is not
trusted.
� Nr r r > �ws�httpz:80���> �https�wssz:443���zHost z is not trusted.)r r r )r r r r �hostr r r �get_host1 s
r) zbytes | None)r r( � root_path�path�query_stringr c C s� | d|g}|du r*|� d� td�|��S |� t|�d�dd�� |� d� |du rbtd�|��S |� t|�d�dd�� |r�|� d� |� t|dd�� td�|��S ) a� Recreate the URL for a request. If an optional part isn't
provided, it and subsequent parts are not included in the URL.
The URL is an IRI, not a URI, so it may contain Unicode characters.
Use :func:`~werkzeug.urls.iri_to_uri` to convert it to ASCII.
:param scheme: The protocol the request used, like ``"https"``.
:param host: The host the request was made to. See :func:`get_host`.
:param root_path: Prefix that the application is mounted under. This
is prepended to ``path``.
:param path: The path part of the URL after ``root_path``.
:param query_string: The portion of the URL after the "?".
z://N�/r! z!$&'()*+,/:;=@%)�safe�?z!$&'()*+,/:;=?@%)�appendr �joinr �rstrip�lstrip)r r( r* r+ r, �urlr r r �get_current_urla s
r5 z
int | None)�http_content_length�http_transfer_encodingr c C s>