File: //lib/python3/dist-packages/twisted/web/__pycache__/_newclient.cpython-310.pyc
o
�bO� � @ s� d Z ddlZddlmZ ddlmZmZmZmZm Z ddl
mZ ddlm
Z
mZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZmZm Z m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z) dZ*dZ+dZ,dZ-e� Z.G dd� de/�Z0G dd� de/�Z1G dd� de/�Z2G dd� de2�Z3G dd� de/�Z4G dd � d e4�Z5G d!d"� d"e4�Z6G d#d$� d$e/�Z7G d%d&� d&e/�Z8G d'd(� d(e/�Z9G d)d*� d*e4�Z:G d+d,� d,e:�Z;G d-d.� d.e/�Z<d/d0� Z=G d1d2� d2e�Z>G d3d4� d4e>�Z?e�@d5eA� �Bd6�f �ZCd7d8� ZDe�@d9�ZEd:d;� ZFee(�G d<d=� d=��ZGG d>d?� d?�ZHd@dA� ZIee(�ZJee)�G dBdC� dC��ZKee
�G dDdE� dE��ZLee�G dFdG� dG��ZMG dHdI� dIe�ZNdS )Ja�
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.
� N)�implementer)�CancelledError�Deferred�fail�
maybeDeferred�succeed)�ConnectionDone)� IConsumer�
IPushProducer)�Protocol)�Logger)�LineReceiver)�
networkString)�proxyForInterface)�Failure)�fullyQualifiedName)�
NO_CONTENT�NOT_MODIFIED�PotentialDataLoss�_ChunkedTransferDecoder� _DataLoss�_IdentityTransferDecoder)�Headers)�UNKNOWN_LENGTH�IClientRequest� IResponse�STATUS�HEADER�BODY�DONEc @ � e Zd ZdZdS )�
BadHeadersz@
Headers passed to L{Request} were in some way invalid.
N��__name__�
__module__�__qualname__�__doc__� r'