← Back
Editing: _newclient.cpython-38.pyc
U s�@g� � @ s� d Z ddlmZmZ eZddlZddlmZ ddl m Z ddlmZ ddl mZ ddlmZ dd lmZmZ dd lmZ ddlmZmZmZmZ ddlmZ dd lmZ ddlmZ ddl m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z( ddl&m)Z)m*Z* ddl&m+Z+m,Z, ddl-m.Z. dZ/dZ0dZ1dZ2e.� Z3G dd� de4�Z5G dd� de4�Z6G dd� de4�Z7G dd � d e7�Z8G d!d"� d"e4�Z9G d#d$� d$e9�Z:G d%d&� d&e9�Z;G d'd(� d(e4�Z<G d)d*� d*e4�Z=G d+d,� d,e4�Z>G d-d.� d.e9�Z?G d/d0� d0e?�Z@G d1d2� d2e4�ZAd3d4� ZBG d5d6� d6e�ZCG d7d8� d8eC�ZDe�Ed9eF� �Gd:�f �ZHd;d<� ZIe�Ed=�ZJd>d?� ZKee#�G d@dA� dA��ZLG dBdC� dC�ZMdDdE� ZNee#�ZOee"�G dFdG� dG��ZPee�G dHdI� dI��ZQee�G dJdK� dK��ZRG dLdM� dMe�ZSdS )Na� An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client. The way to use the functionality provided by this module is to: - Connect a L{HTTP11ClientProtocol} to an HTTP server - Create a L{Request} with the appropriate data - Pass the request to L{HTTP11ClientProtocol.request} - The returned Deferred will fire with a L{Response} object - Create a L{IProtocol} provider which can handle the response body - Connect it to the response with L{Response.deliverBody} - When the protocol's C{connectionLost} method is called, the response is complete. See L{Response.deliverBody} for details. Various other classes in this module support this usage: - HTTPParser is the basic HTTP parser. It can handle the parts of HTTP which are symmetric between requests and responses. - HTTPClientParser extends HTTPParser to handle response-specific parts of HTTP. One instance is created for each request to parse the corresponding response. � )�division�absolute_importN)�implementer)� networkString)�proxyForInterface)�fullyQualifiedName)�Failure)� IConsumer� IPushProducer)�ConnectionDone)�Deferred�succeed�fail� maybeDeferred)�CancelledError)�Protocol)�LineReceiver)�UNKNOWN_LENGTH� IResponse�IClientRequest)�Headers)� NO_CONTENT�NOT_MODIFIED)� _DataLoss�PotentialDataLoss)�_IdentityTransferDecoder�_ChunkedTransferDecoder)�Logger�STATUS�HEADER�BODY�DONEc @ s e Zd ZdZdS )� BadHeadersz@ Headers passed to L{Request} were in some way invalid. N��__name__� __module__�__qualname__�__doc__� r( r( �8/usr/lib/python3/dist-packages/twisted/web/_newclient.pyr"