module documentation
Test HTTP/2 support.
Class |
|
This is a HTTP request handler that works with the IPushProducer implementation in the H2Stream object. The difference between this and the ConsumerDummyHandler is that after resuming production it immediately aborts it again. |
Class |
|
A HTTP request object that writes chunks of data back to the network based on the URL. |
Class |
|
This is a HTTP request handler that works with the IPushProducer implementation in the H2Stream object. No current IRequest object does that, but in principle future implementations could: that codepath should therefore be tested. |
Class |
|
An HTTP request handler that registers a dummy producer to serve the body. |
Class |
|
A test object that converts data received from Twisted's HTTP/2 stack and turns it into a sequence of hyperframe frame objects. |
Class |
|
A class containing lots of helper methods and state to build frames. This allows test cases to easily build correct HTTP/2 frames to feed to hyper-h2. |
Class |
|
Tests that ensure that we handle HTTP/2 flow control limits appropriately. |
Class |
|
The H2Connection object schedules certain events (mostly its data sending loop) using callbacks from the reactor. These tests validate that the calls are scheduled correctly. |
Class |
|
No class docstring; 0/7 class variable, 33/33 methods documented |
Class |
|
A superclass that contains no tests but provides test helpers for HTTP/2 tests. |
Class |
|
The H2Connection object times out idle connections. |
Class |
|
No class docstring; 0/1 class variable, 4/4 methods documented |
Class |
|
A http.Request factory that calls http.Request.notifyFinish on all http.Request objects before it returns them, and squirrels the resulting defer.Deferred away on the class for later use. This is done as early as possible to ensure that we always see the result. |
Function | build |
Provides the byte sequence for a collection of HTTP/2 frames representing the provided request. |
Function | build |
Provides a sequence of HTTP/2 frames that encode a single HTTP request. This should be used when you want to control the serialization yourself, e.g. because you want to interleave other frames with these... |
Function | frames |
Given a sequence of bytes, decodes them into frames. |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable |
|
Undocumented |
Variable | skip |
Undocumented |
Provides the byte sequence for a collection of HTTP/2 frames representing the provided request.
Parameters | |
headers:list of tuple of bytes | The HTTP/2 headers to send. |
data:list of bytes | The HTTP data to send. Each list entry will be sent in its own frame. |
frameFrameFactory | The FrameFactory that will be used to construct the frames. |
streamint | The ID of the stream on which to send the request. |
Provides a sequence of HTTP/2 frames that encode a single HTTP request. This should be used when you want to control the serialization yourself, e.g. because you want to interleave other frames with these. If that's not necessary, prefer buildRequestBytes
.
Parameters | |
headers:list of tuple of bytes | The HTTP/2 headers to send. |
data:list of bytes | The HTTP data to send. Each list entry will be sent in its own frame. |
frameFrameFactory | The FrameFactory that will be used to construct the frames. |
streamint | The ID of the stream on which to send the request. |
Given a sequence of bytes, decodes them into frames.
Note that this method should almost always be called only once, before making some assertions. This is because decoding HTTP/2 frames is extremely stateful, and this function doesn't preserve any of that state between calls.
Parameters | |
data:bytes | The serialized HTTP/2 frames. |
Returns | |
list of hyperframe.frame.Frame subclasses. | A list of HTTP/2 frames. |