-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Issue
It seems to me there is a need for RFC 8878 to specify a maximum window size for using "zstd" Content-Encoding. At least 8MB is recommended as max window size for the decoder, but is not a requirement.
The main issue I see with wide adoption is the risk of having to reject data because of the window size chosen by the encoder.
Describe the solution you'd like
A clear and concise limit on what the max accepted windows size for is HTTP transfers. Then the client has an easy choice, will it accept content with a window up to the limit. If not, it will not add "Accept-Encoding": "zstd".
Describe alternatives you've considered
The alternative is to specify nothing.
In practice what I could see happen is that each client sets its own limit, 64K, 1M, 8MB. The server would either have to just use the smallest accepted window limit (likely) or do client sniffing (unlikely to happen).
Additional context
In my personal opinion even 1MB is rather high. This is considering that browsers often have multiple connections open concurrently to multiple sites.
That said, I can understand you would make it 8MB as per the existing recommendation.
This limit should only apply when using zstd as transfer encoding.