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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Edited to add a test and use byte_size instead of size.
|
|
|
|
|
|
It considers all 0-sized chunks that aren't \r\n\r\n
to be trailers. There's no option for enabling/disabling
the behavior (for example when the te header was sent).
It doesn't parse the trailer, it's up to the user to
parse it separately via the new cow_http:headers/1 functions.
Note that this reuses the TotalLength part of the returned
'done' tuple to signal whether there are trailers. This value
has been ignored in Cowboy since 2.0 and was just a historical
leftover. I'm not aware of anyone using this module outside of
Gun or Cowboy, so I don't expect this to break anything. If it
does, well, it's not a documented function anyway. Your fault.
|
|
See [rfc7725 section 3](https://tools.ietf.org/html/rfc7725#section-3).
|
|
|
|
|
|
|
|
* Update copyright years.
* Update erlang.mk.
* Fix triq testing.
|
|
Also rename the macros for inline lowercasing to ?LOWER,
and move the type detection macros to cow_parse.hrl.
|
|
From RFC7230 and RFC3986.
The new function now validates that the characters are correct,
but does not go as far as validate segment sizes or number of
segments. Its main purpose is still to split host and port.
|
|
Using two functions instead of an argument is a much better way
to handle two specific pathways in the code.
|
|
|
|
|
|
Imported from Cowboy and then optimized.
|
|
|
|
Tidying the code a little.
|
|
|
|
This module contains parsing functions for the basic HTTP items,
basically request-line, response-line and host.
|