• spacewander's avatar
    gzip: change ETag to weak ETag after gzip · e2544597
    spacewander authored
    According to https://tools.ietf.org/html/rfc7232#section-2.1
    > Likewise, a validator is weak if it is shared by two or more
    representations of a given resource at the same time, unless those
    representations have identical representation data.  For example, if
    the origin server sends the same validator for a representation with
    a gzip content coding applied as it does for a representation with no
    content coding, then that validator is weak.
    
    Therefore, after gzip, we should change the original etag to weak etag.
    e2544597
gzip_test.go 4.33 KB