craigcondit commented on PR #158: URL: https://github.com/apache/yunikorn-web/pull/158#issuecomment-2013751033
> Most browsers automatically include 'Accept-Encoding: gzip, deflate' in the request header, so adding it is redundant. Additionally, we may not need to compress or decompress all the data on web at present. Simply providing a compression option for the user may be enough. Keep things as before is one choice. Or any other suggestion? Except not all clients are browsers (and the header is not added by default to things like API calls from javascript in may frameworks). That is the purpose of the `Accept-Encoding` header. If the header is not present, the server *MUST* interpret it as if `Accept-Encoding: identity` were sent -- the `identity` encoding is effectively a no-op. Clients are required to accept unencoded responses; they are not required to accept any form of compression at all. The purpose of the header is to inform the server of the client's capabilities, so that the server may *negotiate* a common encoding. The server *MUST* choose from one of the available encodings, or fall back to `identity` if no common encoding exists. Since we are adding `gzip`, we simply need to test if the client supports it; if so we use `gzip` otherwise we don't compress. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
