관리-도구
편집 파일: response.cpython-36.opt-1.pyc
3 �PfwY � @ s d dl mZ d dlmZ d dlZd dlZd dlZd dlmZ d dlm Z ddlm Z ddlmZmZmZmZmZmZmZ dd lmZmZmZ dd lmZ ddlmZm Z ddl!m"Z"m#Z# ej$e%�Z&G d d� de'�Z(G dd� de'�Z)dd� Z*G dd� dej+�Z,dS )� )�absolute_import)�contextmanagerN)�timeout)�error� )�HTTPHeaderDict)�BodyNotHttplibCompatible� ProtocolError�DecodeError�ReadTimeoutError�ResponseNotChunked�IncompleteRead� InvalidHeader)�string_types�binary_type�PY3)�http_client)� HTTPException�BaseSSLError)�is_fp_closed�is_response_to_headc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�DeflateDecoderc C s d| _ t� | _tj� | _d S )NT)� _first_tryr �_data�zlib� decompressobj�_obj)�self� r �/usr/lib/python3.6/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| jj|�S | j|7 _y | jj|�}|rFd| _ d | _|S tjk r� d| _ tjtj �| _z| j| j�S d | _X Y nX d S )NF)r r � decompressr r r r � MAX_WBITS)r �dataZdecompressedr r r r$ s"