관리-도구
편집 파일: response.cpython-37.pyc
B ��`+n � @ sX d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z yd dlZW n e k rl dZY nX ddlmZ ddlmZmZ dd lmZmZmZmZmZmZmZmZmZmZ dd lmZ ddl m!Z!m"Z" e�#e$�Z%G dd � d e&�Z'G dd� de&�Z(G dd� de&�Z)edk �r*G dd� de&�Z*G dd� de&�Z+dd� Z,G dd� dej-�Z.dS )� )�absolute_importN)�contextmanager)�error)�timeout� )�HTTPHeaderDict)�BaseSSLError� HTTPException) �BodyNotHttplibCompatible�DecodeError� HTTPError�IncompleteRead�InvalidChunkLength� InvalidHeader� ProtocolError�ReadTimeoutError�ResponseNotChunked�SSLError)�six)�is_fp_closed�is_response_to_headc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�DeflateDecoderc C s d| _ d| _t�� | _d S )NT� )� _first_try�_data�zlib� decompressobj�_obj)�self� r �A/opt/alt/python37/lib/python3.7/site-packages/urllib3/response.py�__init__$ s zDeflateDecoder.__init__c C s t | j|�S )N)�getattrr )r �namer r r �__getattr__) s zDeflateDecoder.__getattr__c C s� |s|S | j s| j�|�S | j|7 _y | j�|�}|rFd| _ d | _|S tjk r� d| _ t�tj �| _z| �| j�S d | _X Y nX d S )NF)r r � decompressr r r r � MAX_WBITS)r �dataZdecompressedr r r r% , s"