nginx removes strong etags on gzip compression

ohbarye nginx-forum at forum.nginx.org
Wed Jan 1 12:19:48 UTC 2020


Hi, I'm using nginx as a reverse proxy and found a behavior that I wouldn't
expect.

According to some references below, I assume nginx would downgrade strong
etags to weak ones when it modifies response content (e.g. gzip
compression). But nginx removes strong etags on gzip compression instead of
a downgrade.

- http://nginx.org/en/CHANGES (See "Changes with nginx 1.7.3  08 Jul 2014")
  - > *) Feature: weak entity tags are now preserved on response
modifications, and strong ones are changed to weak.
-
https://github.com/nginx/nginx/commit/def16742a1ec22ece8279185eb2b798eb5ffa031
  - > Entity tags: downgrade strong etags to weak ones as needed.

I created a gist to reproduce the behavior with minimum requirements, please
see https://gist.github.com/ohbarye/86f2d5b464f5e88821133c43a9cf4956

So my question is: Is it expected behavior that nginx removes strong etags
on gzip compression?

Regards

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286645,286645#msg-286645



More information about the nginx mailing list