Client and server common IETF HTTP tools for fault.kernel based applications.
Properties
- HeaderSequence
Type annotation for the header sequence used by Structures instances.
typing
collections0
itertools0
functools0
tools0
cachedproperty
cachedcalls0
timetypes0
memory0
protocol0
media0
ri0
core0
flows0
HeaderSequence0
HeaderSequence = typing.Sequence[typing.Tuple[bytes, bytes]]
ranges288%
ranges(length, range_header)
Generator producing the integer ranges specified by the given Range header.
rangesParameters
Structures0
Manages a sequence of HTTP headers and cached access to specific ones.
Primarily used to extract information from received response (client) or request (server).
Structuresmethod
method = None
Structuresuri
uri = None
Structurespathstring
pathstring = None
Structuresquerystring
querystring = None
Structuresstatus
status = None
Structuresphrase
phrase = None
Structures_uri_struct10%
_uri_struct = None
_uri_struct(self)
Structures_uri_parts10%
_uri_parts = None
_uri_parts(self)
Structures__init__0
__init__(self, headers, *local)
Create a cache for a sequence of headers directly stored.
Structures__init__Parameters
Structuresset_request80%
set_request(self, method, uri)
Configure the structure as representing a request received by a server.
Structuresset_status40%
set_status(self, status, phrase)
Configure the structure as representing a response received by a client.
Structuresredirected233%bool
Whether the response is a redirect.
Structurescache0
cache(self)
Structures__str__10%
__str__(self)
Structures_init_headers191%
_init_headers(self, headers)
Set the headers to be cached and structured for use by an application.
Structurespath233%typing.Sequence[str]
The sequence of path items in pathstring.
Structuresquery233%typing.Optional[dict]
The query parameters of the URI.
Structuresupgrade233%bool
Whether or not the request looking to perform protocol substitution.
Structurescontent420%bool
Whether the headers indicate an associated body.
Structureslength712%typing.Optional[int]
The length of the content; positive if exact, None if no content, and -1 if arbitrary. For HTTP, arbitrary triggers chunked transfer encoding.
Structuresbyte_ranges30%
byte_ranges(self, length)
The byte ranges of the request.
Structuresupgrade_insecure60%
upgrade_insecure(self)
The Upgrade-Insecure-Requests header as a boolean. None if not the header was not present, True if the header value was 1 and False if 0.
Structurescached_headers0
cached_headers = set(
x.lower() for x in [
b'Connection',
b'Upgrade',
b'Host',
b'Upgrade-Insecure-Requests',
b'Range',
b'Expect',
b'Transfer-Encoding',
b'Transfer-Extension',
b'TE',
b'Trailer',
b'Date',
b'Last-Modified',
b'Retry-After',
b'Server',
b'User-Agent',
b'From',
b'P3P',
b'Accept',
b'Accept-Encoding',
b'Accept-Language',
b'Accept-Ranges',
b'Accept-Charset',
b'Content-Type',
b'Content-Language',
b'Content-Length',
b'Content-Range',
b'Content-Location',
b'Content-Encoding',
b'Cache-Control',
b'ETag',
b'Expires',
b'If-Match',
b'If-Modified-Since',
b'If-None-Match',
b'If-Range',
b'If-Unmodified-Since',
b'Authorization',
b'WWW-Authenticate',
b'Proxy-Authenticate',
b'Proxy-Authorization',
b'Location',
b'Max-Forwards',
b'Via',
b'Vary',
b'Forwarded',
b'X-Forwarded-For',
b':Method',
b':URI',
]
)
@property
Structuresconnection250%bytes
Return the connection header stripped and lowered or b'' if no header present.
Structuresmedia_range_cache40%
media_range_cache(range_data)
Cached access to a media range header.
Structuresmedia_range30%
media_range(self)
Structured form of the Accept header.
Structuresmedia_type233%media.Type
media_type(self)
The structured media type extracted from the Content-Type header.
Structuresdate420%timetypes.Timestamp
date(self)
Date header timestamp.
Structureshost233%str
Decoded host header.
Structuresencoding233%str
Character encoding of entity content. None if not applicable.
Structuresfinal516%bool
Whether this is suppoed to be the last transaction in the connection.
_join_send_wire20%
_join_send_wire(event, channel_id, transfer_events)
_join_send_content0
_join_send_content(event, channel_id, transfer_events)
_join_send_chunk0
_join_send_chunk(event, channel_id, transfer_events)
_join_send_eom0
_join_send_eom(event, channel_id, terminal)
_join_initiate_response277%
_join_initiate_response(shared, commands, sequence, event, channel_id, init)
_join_initiate_request370%
_join_initiate_request(shared, commands, sequence, event, channel_id, init)
join0
join(shared, sequence)
Join flow events into a proper HTTP stream.
_fork_response_sync0
_fork_response_sync(state)
Generator that can be used to communicate whether or not the response will have a body. Used with client disposition.
fork1570%
fork(shared, allocate, close, overflow)
Split an HTTP stream into flow events for use by fault.kernel.flows.Division.
TXProtocol0
Protocol class sending HTTP messages.
TXProtocolhttp_version10%
TXProtocolinitiate_server_request0
initiate_server_request(protocol, parameter)
Used by clients to select the proper initiation to send.
TXProtocolinitiate_client_response0
initiate_client_response(protocol, parameter)
Used by servers to select the proper initiation to send.
TXProtocol__init__0
__init__(self, state, initiate)
RXProtocol0
Protocol class receiving HTTP messages.
RXProtocolhttp_version10%
RXProtocolallocate_client_request0
allocate_client_request(parameter)
For use by server receiving the client request.
RXProtocolallocate_server_response0
allocate_server_response(parameter)
For use by clients receiving the server response.
RXProtocolp_close10%
p_close(self)
RXProtocolp_correlate20%
p_correlate(self, send)
RXProtocolp_overflowing30%
p_overflowing(self)
RXProtocol__init__0
__init__(self, state, allocate)
allocate_client_protocol0
allocate_client_protocol()
allocate_server_protocol0
allocate_server_protocol()
allocate_client_protocol_v10
allocate_client_protocol_v1 = allocate_client_protocol
allocate_server_protocol_v10
allocate_server_protocol_v1 = allocate_server_protocol