HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib/python3.10/site-packages/urllib3/__pycache__/filepost.cpython-310.pyc
o

<iT	�@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�>/opt/osm/venv/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	Z_TYPE_FIELDS_SEQUENCErrrrr*rrrr�<module>s(���

�