HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/urllib3/__pycache__/filepost.cpython-310.pyc
o

��hT	�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
e�d�dZej
ejeee	fe
fZejeejee	ffZdd
d�Zddd�Z	dddd�ZdS)�)�annotationsN)�BytesIO�)�_TYPE_FIELD_VALUE_TUPLE�RequestFieldzutf-8��return�strcCst�t�d����S)zN
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    �)�binascii�hexlify�os�urandom�decode�rr�F/usr/local/CyberPanel/lib/python3.10/site-packages/urllib3/filepost.py�choose_boundarysr�fields�_TYPE_FIELDS�typing.Iterable[RequestField]ccsH�t|tj�r|��}n|}|D]}t|t�r|Vqtj|�VqdS)z�
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N)�
isinstance�typing�Mapping�itemsr�from_tuples)r�iterable�fieldrrr�iter_field_objectss�


�r�boundary�
str | None�tuple[bytes, str]cCs�t�}|dur
t�}t|�D]:}|�d|�d��d��t|��|���|j}t|t	�r1t
|�}t|t
�r>t|��|�n|�|�|�d�q|�d|�d��d��d|��}|��|fS)a�
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).
        Values are processed by :func:`urllib3.fields.RequestField.from_tuples`.

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`urllib3.filepost.choose_boundary`.
    Nz--z
zlatin-1s
z--
zmultipart/form-data; boundary=)rrr�write�encode�writer�render_headers�datar�intr	�getvalue)rr�bodyrr%�content_typerrr�encode_multipart_formdata3s 



r*)rr	)rrrr)N)rrrrrr )�
__future__rr�codecsr
r�iorrrr�lookupr#�Sequence�Union�tupler	�_TYPE_FIELDS_SEQUENCErrrrr*rrrr�<module>s(���

�