DEV Community

Dian
Dian

Posted on

Interaction Issue between Apache's ETag Return and Accept-Encoding

Hello, I am encountering an issue related to the ETag return while using Apache and am hoping to get some insights from the community.

In my server environment, when the HTTP Request Header contains Accept-Encoding: gzip, deflate, Apache appends a "-gzip" suffix to the ETag in the response, turning it into "12345-gzip". However, when I send another request to the same resource with "If-None-Match: 12345-gzip" in the headers, Apache responds with a status code of 200 instead of the expected 304.

On the other hand, if I adjust the Request Header to "If-None-Match: 12345", then Apache responds with a 304 status code, which is as expected.

I searched online and found some discussions suggesting that this might be a bug in Apache. However, I would like to further confirm and understand if anyone else has faced a similar issue and how they resolved it. Does anyone have any recommendations or solutions to offer? Much appreciated!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay