Repository URL to install this package:
Version:
0.1.1-1 ▾
|
odigos
/
etc
/
odigos-vmagent
/
instrumentations
/
python
/
urllib3
/
__pycache__
/
fields.cpython-311.pyc
|
---|
§ ÞEqf! ã óÌ d dl mZ d dlZd dlZd dlZddlmZ ddZd Z dd d Z e d ed d¦ « D ¦ « ¦ « d Z d ZeZ G d de¦ « ZdS )é )Úabsolute_importNé )Úsixúapplication/octet-streamc óB | rt j | ¦ « d p|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)ÚfilenameÚdefaults ú5/tmp/pip-target-asg8frr5/lib/python/urllib3/fields.pyÚguess_content_typer s, ð ð <ÝÔ# HÑ-Ô-¨aÔ0Ð;°GÐ;ØNó c óÜ t t j ¦ « r d¦ « t fddD ¦ « ¦ « s7| dd} | d¦ « |S # t t f$ r Y nw xY wt j r d¦ « t j d¦ « | dt j r 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 <https://tools.ietf.org/html/rfc2388#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``. :ret: An RFC-2231-formatted unicode string. úutf-8c 3 ó K | ]}|v V d S ©N© )Ú.0ÚchÚvalues r ú <genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>+ s' øè è Ð/Ð/rrU{Ð/Ð/Ð/Ð/Ð/Ð/r z"\ ú="ú"Úasciiz*=)Ú isinstancer Úbinary_typeÚdecodeÚanyÚencodeÚUnicodeEncodeErrorÚUnicodeDecodeErrorÚPY2ÚemailÚutilsÚencode_rfc2231)Únamer Úresults ` r Úformat_header_param_rfc2231r( s ø õ %Ñ)Ô)ð &ØWÑ%Ô%åÐ/Ð/Ð/Ð/ YÐ/Ñ/Ô/Ñ/Ô/ð Ø#tt U U UÐ+ð ØMM'Ñ"Ô"Ð"ð Møõ #Õ$6Ð7ð ð ð ØDð øøøõ wð &ØWÑ%Ô%õ K×&Ò& u¨gÑ6Ô6EØeeÐ$Eå wð &ØWÑ%Ô%àLs ÁA, Á,B Á?B z%22z\\)r ú\c óf i | ].}|d v¯t j |¦ « d |¦ « /S ))é z%{:02X})r ÚunichrÚformat)r Úccs r ú <dictcomp>r/ J sE ð ð ð àØ WÐÐõ 2 ×)Ò)¨"Ñ-Ô-àÐÐr é c óÄ fd}t j d d ¦ « D ¦ « ¦ « ¦ « }| || ¦ « }|S )Nc ó: | d¦ « S )Nr )Úgroup)ÚmatchÚneedles_and_replacementss r Úreplacerz#_replace_multiple.<locals>.replacerS s ø Ø'¨¯ª°A©¬Ô7Ð7r ú|c ó6 g | ]}t j |¦ « S r )ÚreÚescape)r Úneedles r ú <listcomp>z%_replace_multiple.<locals>.<listcomp>W s" ÐSÐSÐS¨29VÑ$Ô$ÐSÐSÐSr )r9 ÚcompileÚjoinÚkeysÚsub)r r5 r6 Úpatternr' s ` r Ú_replace_multiplerB R st ø ð8ð 8ð 8ð 8ð 8õ jØ ÐSÐSÐ3K×3PÒ3PÑ3RÔ3RÐSÑSÔSÑTÔTñô Gð [[ 5Ñ )Ô )FàMr c ó t |t j ¦ « r| d¦ « }t |t ¦ « }| d|dS )a± Helper function to format and quote a single header parameter using the HTML5 strategy. Particularly useful for header parameters which might contain non-ASCII values, like file names. This follows the `HTML5 Working Draft Section 4.10.22.7`_ and matches the behavior of curl and modern browsers. .. _HTML5 Working Draft Section 4.10.22.7: https://w3c.github.io/html/sec-forms.html#multipart-form-data :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``. :ret: A unicode string, stripped of troublesome characters. r r r )r r r r rB Ú_HTML5_REPLACEMENTS)r&