Age | Commit message (Collapse) | Author |
|
WEBTRANSPORT -> WT in most places. Only ENABLE_WEBTRANSPORT
remains (since it is a draft-02 setting that was later removed)
as well as internal functions and atoms about stream headers,
for greater clarity.
|
|
This adds support for WebTransport HTTP/3 settings, error codes,
headers, stream types as well as capsules, with an initial
implementation of the Capsule protocol.
|
|
|
|
|
|
This allows cleaning up timers and avoids receiving
stray timeout messages when reusing a process. This
is otherwise optional since the termination of a
process cleans up the timers.
|
|
|
|
|
|
|
|
This is to be used primarily by a client before initiating a new stream
so that it can respect the setting from the server.
|
|
|
|
When the client does not provide the "client_max_window_bits" option,
the server must be able to handle a sliding window of up to 32,768 bytes.
When the server has configured a lower limit than the default, and the
client has not provided the parameter, compression must be disabled.
Co-authored-by: Ignacio Martínez <[email protected]>
|
|
The `max_inflate_size` value can be configured in the extensions
map to set a limit to the size of the expanded data.
This is done via the previously introduced cow_deflate:inflate/3
function.
|
|
This function can be used to safely inflate data
up to a given limit. It has been extracted from
the cowboy_decompress_h module.
|
|
An empty deflate block must be inserted
when zlib returns nothing.
|
|
|
|
Disable improper lists warnings in cow_qs/cow_uri since
we intentionally create them.
|
|
This has no real impact on performance
but simplies the code a little.
|
|
By (un)masking 16 bytes at a time when possible
(instead of 4) we process frames roughly 10% faster
for all frame types.
|
|
See comment within the commit for full details.
This results in improved Cowboy performance decoding text
messages of around 10 to 15% in all scenarios, except when
the message is small and it contains mostly non-ASCII (due
to the cost of trying ASCII first).
This brings decoding of text frames closer to decoding of
binary frames, with ASCII data taking approximately 1.1 times
longer to decode, mixed data 1.25 times longer and mostly
non-ASCII data 1.35 times longer to decode.
|
|
|
|
See the previous commit [1] for details on the
optimisations involved. The optimisation provides
the same type of performance gains for encoding,
decoding, building and parsing query strings.
[1] cdaac4c907dbee90a91ad123b18dc6919a3835f6
|
|
See the previous commit [1] for details on the
optimisations involved. The optimisation provides
the same type of performance gains for encoding
and decoding.
[1] cdaac4c907dbee90a91ad123b18dc6919a3835f6
|
|
The recently added `json` module in OTP demonstrated
new, better ways of optimising binary string manipulations.
Some of which likely make better use of recent compiler
or VM improvements.
The main improvement is returning as fast as possible
when there's nothing to decode:
cow_uri:urldecode in 0.053833s
cow_uri:urldecode in 0.005991s
When there's a little to decode, the performance is
nicely improved, although not as much:
cow_uri:urldecode_hex in 0.061018s
cow_uri:urldecode_hex in 0.040028s
When the input if fully/mostly encoded JP text, the
difference is remarkable:
cow_uri:urldecode_jp_hex in 0.099333s
cow_uri:urldecode_jp_hex in 0.039391s
cow_uri:urldecode_jp_mixed_hex in 0.097653s
cow_uri:urldecode_jp_mixed_hex in 0.046385s
The worst case scenario unfortunately is slower than
before, but nothing too bad. The worst case is when
the input is a sequence of 3 encoded characters
followed by 3 non-encoded characters:
cow_uri:urldecode_worst_case_hex in 0.050017s
cow_uri:urldecode_worst_case_hex in 0.061515s
|
|
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.
|
|
|
|
|
|
|
|
|
|
Since a draft for a revision was introduced the tests have
started covering additions that we don't currently support.
|
|
|
|
OTP fixed a bug that leads to the bad spec no longer compiling.
Fix is expected to land in OTP-26.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Loïc: amended to add RFC5861 examples to the tests.
|
|
In particular we now ignore unknown authentication parameters.
Loïc: Small cleanup edits in amend.
|
|
|
|
I have in the process changed the output a little with
regard to parameters. The dictionaries also build as
a list of key-values now to keep ordering. This should
be the definitive interface.
|
|
|
|
|
|
|
|
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.
|
|
|