I have a question around whether it's correct to send Vary: Accept-Encoding in the case that a (Django) middleware compresses a response, realizes that made it larger, and sends the uncompressed version instead.
-
Give your brief opinion based on knowledge of the HTTP specs and web browser and client practices.
-
Test nginx and caddy's behaviour here - run them under Docker with basic config that sends back 1000 random bytes, with gzip compression on, and see if they add the
Varyclause.