관리-도구
편집 파일: header.cpython-310.opt-2.pyc
o 6��f&^ � @ s� g d �Z ddlZddlZddlZddlZddlmZ ddlmZ e j Z dZdZdZ dZd Zd ZdZe d�Ze d �Ze�dejejB �Ze�d�Ze�d�ZejjZdd� Z ddd�ZG dd� d�ZG dd� d�ZG dd� de �Z!dS ))�Header� decode_header�make_header� N)�HeaderParseError)�charset� � � z � �N z �us-asciizutf-8ai =\? # literal =? (?P<charset>[^?]*?) # non-greedy up to the next ? is the charset \? # literal ? (?P<encoding>[qQbB]) # either a "q" or a "b", case insensitive \? # literal ? (?P<encoded>.*?) # non-greedy up to the next ?= is the encoded string \?= # literal ?= z[\041-\176]+:$z \n[^ \t]+:c C s� t | d�rdd� | jD �S t�| �s| d fgS g }| �� D ]A}t�|�}d}|r_|�d�}|r6|�� }d}|r@|�|d d f� |r]|�d�� � }|�d�� � }|�d�}|�|||f� |s)qg } t |�D ]%\} }| dkr�|d r�|| d d r�|| d d �� r�| �| d � qft| �D ]}||= q�g } |D ][\}}}|d u r�| �||f� q�|d kr�t j�|�}| �||f� q�|d kr�t|�d }|r�|dd d| � 7 }zt j�|�}W n tjy� td ��w | �||f� q�td| ��g }d }}| D ]:\}}t|t��r t|d�}|d u �r|}|}q�||k�r(|�||f� |}|}q�|d u �r4|t| 7 }q�||7 }q�|�||f� |S )N�_chunksc S s( g | ]\}}t �|t|��t|�f�qS � )�_charsetZ_encode�str)�.0�stringr r r �3/opt/alt/python310/lib64/python3.10/email/header.py� <listcomp>M s �z!decode_header.<locals>.<listcomp>Tr F� � �q�b� z===zBase64 decoding errorzUnexpected encoding: zraw-unicode-escape)�hasattrr �ecre�search� splitlines�split�pop�lstrip�append�lower� enumerate�isspace�reversed�email� quoprimimeZ header_decode�lenZ base64mime�decode�binascii�Errorr �AssertionError� isinstancer �bytes�BSPACE)�headerZwords�line�parts�firstZ unencodedr �encodingZencodedZdroplist�n�w�dZ decoded_wordsZencoded_stringZwordZpaderrZ collapsedZ last_word�last_charsetr r r r = s� � ��4�� r c C sH t |||d�}| D ]\}}|d urt|t�st|�}|�||� q |S )N)� maxlinelen�header_name�continuation_ws)r r- �Charsetr! )Zdecoded_seqr9 r: r; �h�sr r r r r � s �r c @ sP e Zd Z ddd�Zdd� Zdd � Zdd d�Zdd � Zddd�Zdd� Z dS )r Nr �strictc C s� |d u rt }n t|t�st|�}|| _|| _g | _|d ur%| �|||� |d u r+t}|| _|d u r7d| _ d S t |�d | _ d S )Nr r )�USASCIIr- r<