File: //usr/lib/python3/dist-packages/twisted/web/__pycache__/http.cpython-310.pyc
o
^h�b,� � @ s� d Z g d�ZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlm
Z
ddlmZmZmZmZ ddlmZmZmZ ddlmZmZmZmZ ddlmZ dd l m!Z!m"Z"m#Z# dd
l$m%Z% ddl&m'Z' ddl(m)Z) dd
l*m+Z+ ddl,m-Z-m.Z. ddl/m0Z0 ddl1m2Z2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZg ddlhmiZimjZj ddlkmlZlmmZmmnZn z
ddlompZp dZqW n er�y, dZqY nw dZsdZtdZue`Zvg d�Zwg d�Zxdd � ewD �Zyd!d � exD �Zzd"d#� Z{d$d%� Zdkd&d'�Z|dld(d)�Z}dld*d+�Z~d,d-� Zd.d/� Z�d0d1� Z�d2e�d3e�fd4d5�Z�d2e�d3e�fd6d7�Z�d8e�d3ee�e�f fd9d:�Z�d;d<� Z�G d=d>� d>e�Z�G d?d@� d@�Z�G dAdB� dBe-j��Z�dCZ�e�� Z�dDdE� Z�e��dF�Z�ee"j�e��G dGdH� dH��Z�G dIdJ� dJe��Z�G dKdL� dLe��Z�G dMdN� dNe��Z�G dOdP� dP�Z�dQZ�dRZ� G dSdT� dT�Z�ee"j��G dUdV� dV��Z�ee"j�e"j�e"j��G dWdX� dXe-j�e.j���Z�dYdZ� Z�eel�d[d\� �Z�ee"j��G d]d^� d^��Z�G d_d`� d`e6enda��Z�eel�dbdc� �Z�G ddde� dee6e)df��Z�dgdh� Z�G didj� dje#j��Z�dS )ma�
HyperText Transfer Protocol implementation.
This is the basic server-side protocol implementation used by the Twisted
Web server. It can parse HTTP 1.0 requests and supports many HTTP 1.1
features as well. Additionally, some functionality implemented here is
also useful for HTTP clients (such as the chunked encoding parser).
@var CACHED: A marker value to be returned from cache-related request methods
to indicate to the caller that a cached response will be usable and no
response body should be generated.
@var FOUND: An HTTP response code indicating a temporary redirect.
@var NOT_MODIFIED: An HTTP response code indicating that a requested
pre-condition (for example, the condition represented by an
I{If-Modified-Since} header is present in the request) has succeeded. This
indicates a response body cached by the client can be used.
@var PRECONDITION_FAILED: An HTTP response code indicating that a requested
pre-condition (for example, the condition represented by an I{If-None-Match}
header is present in the request) has failed. This should typically
indicate that the server has not taken the requested action.
@var maxChunkSizeLineLength: Maximum allowable length of the CRLF-terminated
line that indicates the size of a chunk and the extensions associated with
it, as in the HTTP 1.1 chunked I{Transfer-Encoding} (RFC 7230 section 4.1).
This limits how much data may be buffered when decoding the line.
)=� SWITCHING�OK�CREATED�ACCEPTED�NON_AUTHORITATIVE_INFORMATION�
NO_CONTENT�
RESET_CONTENT�PARTIAL_CONTENT�MULTI_STATUS�MULTIPLE_CHOICE�MOVED_PERMANENTLY�FOUND� SEE_OTHER�NOT_MODIFIED� USE_PROXY�TEMPORARY_REDIRECT�PERMANENT_REDIRECT�BAD_REQUEST�UNAUTHORIZED�PAYMENT_REQUIRED� FORBIDDEN� NOT_FOUND�NOT_ALLOWED�NOT_ACCEPTABLE�PROXY_AUTH_REQUIRED�REQUEST_TIMEOUT�CONFLICT�GONE�LENGTH_REQUIRED�PRECONDITION_FAILED�REQUEST_ENTITY_TOO_LARGE�REQUEST_URI_TOO_LONG�UNSUPPORTED_MEDIA_TYPE�REQUESTED_RANGE_NOT_SATISFIABLE�EXPECTATION_FAILED�INTERNAL_SERVER_ERROR�NOT_IMPLEMENTED�BAD_GATEWAY�SERVICE_UNAVAILABLE�GATEWAY_TIMEOUT�HTTP_VERSION_NOT_SUPPORTED�INSUFFICIENT_STORAGE_SPACE�NOT_EXTENDED� RESPONSES�CACHED�urlparse�parse_qs�datetimeToString�datetimeToLogString�timegm�stringToDatetime�toChunk� fromChunk�parseContentRange�StringTransport�
HTTPClient�
NO_BODY_CODES�Request�PotentialDataLoss�HTTPChannel�HTTPFactory� N)�BytesIO)�AnyStr�Callable�Optional�Tuple)�ParseResultBytes�unquote_to_bytesr. )� Attribute� Interface�implementer�provider)�Version)�address�
interfaces�protocol)�_PullToPush)�Deferred)� IProtocol)�Logger)�basic�policies)�log)� _PY37PLUS�nativeString�
networkString)�proxyForInterface)�
deprecated)�Failure),r r&