Pregunta

HTTP 1.1 defines a weak comparison function for cache validators:

in order to be considered equal, both validators MUST be identical in every way, but either or both of them MAY be tagged as "weak" without affecting the result.

I understand that following statement (for two ETags) is true:

W/"Foo" = "Foo"

Now I'm wondering what real world use case might exist where a server compares a weak ETag against a strong one.

¿Fue útil?

Solución

There are cases where servers first assign a weak etag, and later on promote it to a strong etag (by removing the "W/" prefix). An example is Apache moddav (or is it plain httpd?), when configured to create entity tags based on the filesystem timestamp of the file being served.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top