Age | Commit message (Collapse) | Author |
|
Cowlib now uses GitHub Actions for CI. As a result
of this change, Cowlib is tested against OTP-24+.
This commit adds initial implementations of
cow_http3, cow_http3_machine and cow_qpack.
Because QPACK is similar to HPACK, some encoding and
decoding functions were moved to a common include file,
particularly the huffman functions.
The cow_http module now contains the types and functions
common to all or most versions of HTTP. The types and
functions specific to HTTP/1 were moved to the new
cow_http1 module.
Because HTTP/3 is similar to HTTP/2, part of the code
processing headers is common and can be found in
cow_http. Other functions common to both versions
were moved out of cow_http2_machine.
This commit updates comments indicating that the HTTP/2
PRIORITY mechanism will no longer be implemented.
|
|
|
|
|
|
|
|
New function set_last_streamid/1 sets the last accepted stream ID
to the last known remote stream ID. Frames with a remote stream ID
greater than this are thereafter discarded by frame/2, which returns
{ok, Http2Machine} for such frames.
|
|
LH: I've updated the code to include enable_connect_protocol
conditionally depending on the endpoint.
|
|
They are currently optional to avoid doing a breaking change
but should become mandatory (perhaps with a default value of
undefined) in Cowlib 3.0.
|
|
The error was appropriate for server mode, but not for client
mode, because the server does not send the preface sequence.
|
|
|
|
|
|
|
|
|
|
|
|
The better solution is to use the ensure_window functions,
if updating the window is necessary.
|
|
This controls how large the window should be before we are
willing to send data. We of course always send data when
the data we need to send is lower than the current window.
This is both an optimization and a fix for the data dribble
denial of service vulnerability (CVE-2019-9511).
|
|
The function can be used to restrict how big all the
buffers of a single connection can get.
|
|
It's not a big gain and causes issues when forgetting to update
the list. Maybe it can be added back again at a later time.
|
|
|
|
|
|
When a final empty frame was queued and the data sent made
the window go to 0 and the remote end didn't increase the
window anymore, the final empty frame could get stuck in
the queue and never sent.
Also ensure that we never queue empty non-final data.
|
|
|
|
These functions apply heuristics to reduce the number of times
we send WINDOW_UPDATE frames.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is the result of a merge of the Cowboy and Gun HTTP/2 codes.
It can probably do a little more but it's at a point where Cowboy
works fine when using it so additional work will be done in other
commits.
The Gun code has not been switched to this module yet. I expect
for example the PUSH_PROMISE code to fail at this point. This will
be the next step.
|