RFC 7230 §4.1 defined "chunk extensions", additional key-value pairs that can be sent along with chunk in an HTTP message encoded with Transfer-Encoding: chunked:
The chunked encoding allows each chunk to include zero or more chunk extensions, immediately following the chunk-size, for the sake of supplying per-chunk metadata (such as a signature or hash), mid-message control information, or randomization of message body size.
HTTP/2 claims,
HTTP/2 is intended to be as compatible as possible with current uses of HTTP. This means that, from the application perspective, the features of the protocol are largely unchanged. To achieve this, all request and response semantics are preserved, although the syntax of conveying those semantics has changed.
In HTTP/2, the DATA frames are used to carry data, in chunks, instead of the chunked Transfer-Encoding:
HTTP/2 uses DATA frames to carry message payloads. The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] MUST NOT be used in HTTP/2.
but, AFAICT, DATA frames offer no support for chunk extensions, only an optional padding.
In particular, how is an HTTP/1.1 to HTTP/2 proxy, receiving a request containing chunks bearing well-formed chunk-extensions supposed to translate those chunks to HTTP/2?
In https://greenbytes.de/tech/webdav/rfc7540.html#rfc.section.8.1.p.4:
HTTP/2 uses DATA frames to carry message payloads. The chunked transfer encoding defined in Section 4.1 of [RFC7230] MUST NOT be used in HTTP/2.
So no chunked encoding, thus no chunked extensions.
In particular, how is an HTTP/1.1 to HTTP/2 proxy, receiving a request containing chunks bearing well-formed chunk-extensions supposed to translate those chunks to HTTP/2?
RFC 7230 §4.1.1 states:
A recipient MUST ignore unrecognized chunk extensions.
You'll have difficulty recognizing any chunk extensions, since none have ever been defined that I can tell.
Transfer-Encoding is a hop-by-hop header, so you can compliantly discard any chunk extensions you receive and generate DATA frames from the chunked data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With