문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top