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: //usr/local/lib/python3.7/site-packages/urllib3/__pycache__/filepost.cpython-37.pyc
B

���g[	�@s�ddlmZddlZddlZddlZddlZddlmZddlm	Z	m
Z
e�d�dZej
ejejee	fe
fZejeejee	ffZdd	�d
d�Zdd
d�dd�Zddddd�dd�ZdS)�)�annotationsN)�BytesIO�)�_TYPE_FIELD_VALUE_TUPLE�RequestFieldzutf-8��str)�returncCst�t�d����S)zN
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    �)�binascii�hexlify�os�urandom�decode�rr�:/usr/local/lib/python3.7/site-packages/urllib3/filepost.py�choose_boundarysr�_TYPE_FIELDSztyping.Iterable[RequestField])�fieldsr	ccsJt|tj�r|��}n|}x*|D]"}t|t�r6|Vq tj|�Vq WdS)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



rz
str | Noneztuple[bytes, str])r�boundaryr	cCs�t�}|dkrt�}x�t|�D]t}|�d|�d��d��t|��|���|j}t|t	�rdt
|�}t|t
�r~t|��|�n
|�|�|�d�qW|�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')N)�
__future__rr�codecsr
r�iorrrr�lookupr �Sequence�Union�TuplerZ_TYPE_FIELDS_SEQUENCErrrrr'rrrr�<module>s