ETag changes when Rack :: Deflater is turned on

stumbled upon something strange if you enable Rack :: Deflater for gzip my response body. Maybe I missed something, but the response was compressed, however, the ETag for the resource changes with each individual request. This makes the application respond every time, rather than sending 304. It works without Rack :: Deflater turned on, and I confirmed that the source of the page does not change. I am running a rails application with a thin web server.

Gemfile.lock https://gist.github.com/2510816

Is there any way to get a little more output from the rack middleware so that I can see what is happening?

Thanks in advance.

+3
source share
1 answer

, , . : Rack:: Deflater Rack:: ETag . , , ETag , , config.middleware.use "Rack::Deflater" config.middleware.insert_before "Rack::ETag", "Rack::Deflater", ETag . 304, , - . , - .

+7

All Articles