I wrote a middleware to change the etag in the deflater middleware if the content encoding is changed because two representations should not have the same etag. If etag is present it adds the content encoding to the end of it, so if the ETag is previously set to "xxx" from Rack::ETag it becomes "xxxgzip" if it gets gzipped.

Is this something that should be done inside Deflater?

It's a simple change but I had trouble getting the test code to pass along an etag header. If there is any interest I can finish a patch to deflater or submit it as a separate middleware.