Age | Commit message (Collapse) | Author |
|
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.
|