bg+ddlmZddlZddlZddlZejeefZ eje ej ee fej ee effZ ddd Z dd Z ddZddZddZGddZdS)) annotationsNapplication/octet-streamfilename str | NonedefaultstrreturncB|rtj|dp|S|S)z Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. :param default: If no "Content-Type" can be guessed, default to `default`. r) mimetypes guess_type)rrs E/opt/cloudlinux/venv/lib64/python3.11/site-packages/urllib3/fields.pyguess_content_typers,<#H--a0;G; Nnamevalue_TYPE_FIELD_VALUEcddl}|dtdttrdt fddDs7|d d } |d |S#ttf$rYnwxYwtj d|d S) a Helper function to format and quote a single header parameter using the strategy defined in RFC 2231. Particularly useful for header parameters which might contain non-ASCII values, like file names. This follows `RFC 2388 Section 4.4 `_. :param name: The name of the parameter, a string expected to be ASCII only. :param value: The value of the parameter, provided as ``bytes`` or `str``. :returns: An RFC-2231-formatted unicode string. .. deprecated:: 2.0.0 Will be removed in urllib3 v2.1.0. This is not valid for ``multipart/form-data`` header parameters. rNz'format_header_param_rfc2231' is deprecated and will be removed in urllib3 v2.1.0. This is not valid for multipart/form-data header parameters. stacklevelutf-8c3 K|]}|vV dSN).0chrs r z.format_header_param_rfc2231..@s'//rrU{//////rz"\ =""asciiz*=) warningswarnDeprecationWarning isinstancebytesdecodeanyencodeUnicodeEncodeErrorUnicodeDecodeErroremailutilsencode_rfc2231)rrr!results ` r format_header_param_rfc2231r/s (OOO MM 1  %& W%% ////Y/// / /$$E$$$  MM' " " "M#$67    D  K & &ug 6 6E  u  E Ls1BBBct|tr|d}|dddd}|d|dS)a Format and quote a single multipart header parameter. This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching the behavior of current browser and curl versions. Values are assumed to be UTF-8. The ``\n``, ``\r``, and ``"`` characters are percent encoded. .. _WHATWG HTML Standard: https://html.spec.whatwg.org/multipage/ form-control-infrastructure.html#multipart-form-data :param name: The name of the parameter, an ASCII-only ``str``. :param value: The value of the parameter, a ``str`` or UTF-8 encoded ``bytes``. :returns: A string ``name="value"`` with the escaped value. .. versionchanged:: 2.0.0 Matches the WHATWG HTML Standard as of 2021/06/10. Control characters are no longer percent encoded. .. versionchanged:: 2.0.0 Renamed from ``format_header_param_html5`` and ``format_header_param``. The old names will be removed in urllib3 v2.1.0. rz%0Az%0Dz%22) "rr)r$r%r& translate)rrs r format_multipart_header_paramr5Os[<%& W%% OOEu== > >E  e   rcdddl}|dtdt||S) .. deprecated:: 2.0.0 Renamed to :func:`format_multipart_header_param`. Will be removed in urllib3 v2.1.0. rNz'format_header_param_html5' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.rrr!r"r#r5rrr!s r format_header_param_html5r:uG OOO MM %   )u 5 55rcdddl}|dtdt||S)r7rNzz'format_header_param' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.rrr8r9s r format_header_paramr=r;rcfeZdZdZ ddd Ze dd dZd!dZd"dZd#dZ dd$dZ dS)% RequestFielda A data container for request body parameters. :param name: The name of this request field. Must be unicode. :param data: The data/value body. :param filename: An optional filename of the request field. Must be unicode. :param headers: An optional dict-like object of headers to initially use for the field. .. versionchanged:: 2.0.0 The ``header_formatter`` parameter is deprecated and will be removed in urllib3 v2.1.0. Nrrdatarrrheaderstyping.Mapping[str, str] | Noneheader_formatter5typing.Callable[[str, _TYPE_FIELD_VALUE], str] | Nonec||_||_||_i|_|rt ||_|*ddl}|dtd||_dSt|_dS)NrzUThe 'header_formatter' parameter is deprecated and will be removed in urllib3 v2.1.0.rr) _name _filenamer@rAdictr!r"r#rCr5)selfrr@rrArCr!s r __init__zRequestField.__init__s ! .0  )==DL  ' OOO MM5"     %5D ! ! !$AD ! ! !r fieldnamer_TYPE_FIELD_VALUE_TUPLEr ct|trt|dkr""""*+/#''+ <<<<<<r~s-"""""" Le, , L''( L',-/*D      ----`####L6666$6666$@<@<@<@<@<@<@<@<@<@