Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
share
/
dput
/
dput
/
methods
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: http.cpython-310.pyc
o ��d� � @ s~ d Z ddlZddlZddlmZ ddlZddlZddlZddl m Z dZG dd� dejj �ZG d d � d �Zddefdd �ZdS )z( Implementation for HTTP upload method. � N)�HTTPConnection� )� dputhelperzutf-8c @ s e Zd ZdZdd� Zdd� ZdS )�PromptingPasswordMgrz� Password manager that prompts at the terminal. Custom HTTP password manager that prompts for a password using getpass() if required, and mangles the saved URL so that only one password is prompted for. c C s t jj�| � || _d S �N)�urllib�request�HTTPPasswordMgr�__init__�username)�selfr � r �$/usr/share/dput/dput/methods/http.pyr s zPromptingPasswordMgr.__init__c C sV | � |�d }tjj�| ||�}|dkr|S t�d| �}| �||| j|� | j|fS )Nr )NNz Password for %s:)� reduce_urir r r �find_user_password�getpass�add_passwordr )r �realm�authuri�authinfo�passwordr r r r $ s � z'PromptingPasswordMgr.find_user_passwordN)�__name__� __module__�__qualname__�__doc__r r r r r r r s r c @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�AuthHandlerHackAroundz! Fake request and parent object. c C sV i | _ || _|| _g | _i | _tjjtjjfD ]}||�}|� | � | j� |� qd S r )�headers�url�resp_headers�authhandlers�timeoutr r �HTTPBasicAuthHandler�HTTPDigestAuthHandler� add_parent�append)r r r �pwman�authhandler_class�ahr r r r 4 s � �zAuthHandlerHackAround.__init__c C � || j |<