%PDF- %PDF-
Direktori : /lib/python3/dist-packages/uaclient/http/__pycache__/ |
Current File : //lib/python3/dist-packages/uaclient/http/__pycache__/__init__.cpython-312.pyc |
� �Hcf- � � � d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZm Z m Z d dlmZm Z d dlmZmZ d dlmZmZmZ dZdZdZd Zd Z ej4 ej6 e� � Z e ddefd eeef fdefg� Z e ddefd eeef fdefdeeef fdee fg� Z!dede"fd�Z#dede e dede e fd�Z$i a%de e de e ddfd�Z&deeef fd�Z' d)de jP de e de fd�Z)d � Z*d!� Z+ d*de jP de e de e de fd"�Z,de e fd#�Z-di ddd$fded%e e. d eeef d&e e de e d'e"de!fd(�Z/y)+� N)�Any�Dict�List� NamedTuple�Optional)�error�request)�ParseResult�urlparse)�defaults� exceptions�util)z169.254.169.254�metadataz[fd00:ec2::254]zhttp://archive.ubuntu.comzhttps://esm.ubuntu.comzhttp://api.snapcraft.iozhttps://api.snapcraft.io�UnparsedHTTPResponse�code�headers�body�HTTPResponse� json_dict� json_list�url�returnc � � t | � }|j dvry |j y# t $ r Y yw xY w# t $ r Y yw xY w)NF)�https�httpT)r � ValueError�scheme�port)r � parsed_urls �8/usr/lib/python3/dist-packages/uaclient/http/__init__.py�is_service_urlr! ( s\ � ���c�]� � ��� 1�1������ �� � ���� � ���s �* �9 � 6�6� A�A�protocol�proxy�test_urlc �x � |sy t |� st j |�� �t j |d�� }| dk( rMt |� j dk( r5 t ||�� }|j dk( r|S t j |�� �t j"