ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/requests/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/requests/__pycache__/utils.cpython-311.pyc |
� �܋f�� � �f � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZmZ ddlmZ ddlmZ ddlmZmZmZmZ dd lmZmZmZmZmZmZ dd lm Z! ddlm"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* dd l+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1 dZ2 ej3 � � Z4ddd�Z5d�6 ej7 d ed�� � d � � � � Z8ej9 dk rd� Z:d� Z"d� Z;d� Z<dJd�Z=d� Z>d � Z?ej@ d!� � � ZAd"� ZBd#� ZCd$� ZDd%� ZEdJd&�ZFd'� ZGd(� ZHd)� ZId*� ZJd+� ZKd,� ZLd-� ZMd.� ZN eOd/� � ZPd0� ZQd1� ZRd2� ZSd3� ZTd4� ZUd5� ZVej@ d6� � � ZWd7� ZXdKd8�ZYd9� ZZdLd:�Z[dMd<�Z\d=� Z]d>� Z^d?�_ d@� � Z`e`dAz Zae`dBz ZbdC� ZcdD� ZddE� ZedF� ZfdG� ZgdH� ZhdI� ZidS )Nz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N)�OrderedDict)�make_headers� parse_url� )�certs��__version__)�_HEADER_VALIDATORS_BYTE�_HEADER_VALIDATORS_STR�HEADER_VALIDATORS�to_native_string)�Mapping� basestring�bytes� getproxies�getproxies_environment� integer_types)�parse_http_list)�proxy_bypass�proxy_bypass_environment�quote�str�unquote�urlparse� urlunparse��cookiejar_from_dict)�FileModeWarning� InvalidHeader� InvalidURL�UnrewindableBodyError)�CaseInsensitiveDict)z.netrc�_netrc�P i� )�http�httpsz, z,\s*T)�accept_encodingzaccept-encoding�win32c �L � dd l }n# t $ r Y dS w xY w |� |j d� � }t |� |d� � d � � }|� |d� � d }n# t t f$ r Y dS w xY w|r|sdS |� d� � }|D ]t}|dk rd| vr d S |� dd � � }|� dd� � }|� d d� � }t j || t j � � r d S �udS )Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet Settings�ProxyEnable� ProxyOverride�;z<local>�.Tz\.�*z.*�?) �winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError� ValueError�split�replace�re�match�I)�hostr0 �internetSettings�proxyEnable� proxyOverride�tests �E/opt/cloudlinux/venv/lib64/python3.11/site-packages/requests/utils.py�proxy_bypass_registryrC L sv � � ��M�M�M�M��� � � ��5�5� ���� �%�~�~��(�N� � �� �f�1�1�2B�M�R�R�ST�U�V�V�K�"�/�/�0@�/�R�R�ST�U�M�M����$� � � ��5�5� ����� �-� ��5� &�+�+�C�0�0� �!� � �D��y� � ��d�?�?��4�4��<�<��U�+�+�D��<�<��U�+�+�D��<�<��T�*�*�D��x��d�B�D�)�)� ��t�t� ��us � � ��A A: �:B�Bc �Z � t � � rt | � � S t | � � S )z�Return True, if the host should be bypassed. Checks proxy settings gathered from the environment, if specified, or the registry. )r r rC )r= s rB r r p s. � � "�#�#� /�+�D�1�1�1�(��.�.�.� c �N � t | d� � r| � � � } | S )z/Returns an internal sequence dictionary update.�items)�hasattrrG )�ds rB �dict_to_sequencerJ | s( � � �q�'��� � �G�G�I�I���HrE c �� � d }d}t | d� � rt | � � }n�t | d� � r| j }n~t | d� � rn | � � � }t j |� � j }d| j vrt j dt � � n# t j t f$ r Y nw xY wt | d� � r� | � � � }t | d� � rW|�U | � dd � � | � � � }| � |pd� � n'# t $ r d}Y nw xY wn# t $ r |�|}Y nw xY w|�d}t! d||z � � S ) Nr �__len__�len�fileno�ba% Requests has determined the content-length for this request using the binary size of the file: however, the file has been opened in text mode (i.e. without the 'b' flag in the mode). This may lead to an incorrect content-length. In Requests 3.0, support will be removed for files in text mode.�tell�seek� )rH rM rN �os�fstat�st_size�mode�warnings�warnr �io�UnsupportedOperation�AttributeErrorrP rQ r6 �max)�o�total_length�current_positionrN s rB � super_lenr` � s� � ��L����q�)��� ��1�v�v��� ��E� � � ��u��� ��H� � � � ��X�X�Z�Z�F� �8�F�+�+�3�L� �!�&� � �� �2� $� � � ��� �'��8� � � � �D� ����. �q�&��� %� %� �v�v�x�x�� �q�&�!�!� %�l�&:� %��F�F�1�a�L�L�L�#$�6�6�8�8�L� �F�F�+�0�q�1�1�1�1��� %� %� %�#$�L�L�L�%������% � 0� 0� 0� �'�#/� ��� 0����* �����q�,�!1�1�2�2�2s7 �B �B8�7B8�E �3AD5 �5E�E�E�EFc �� � t j � d� � }|�|f}nd� t D � � } ddlm}m} d}|D ]X} t j � |� � }n# t $ r Y dS w xY wt j � |� � r|} n�Y|�dS t | � � } d} t | t � � r| � d� � } | j � | � � d } ||� � � |� � }|r|d rdnd} || |d fS dS # |t"