class ASF::ETAG_Deflator_workaround
Running deflate and etag together confuses caching:
httpd.apache.org/docs/trunk/mod/mod_deflate.html#deflatealteretag
scarff.id.au/blog/2009/apache-304-and-mod_deflate-revisited/
workaround is to strip the suffix in Rack middleware
Public Class Methods
Source
# File lib/whimsy/asf/rack.rb, line 191 def initialize(app) @app = app end
capture the app
Public Instance Methods
Source
# File lib/whimsy/asf/rack.rb, line 196 def call(env) if env['HTTP_IF_NONE_MATCH'] env['HTTP_IF_NONE_MATCH'] = env['HTTP_IF_NONE_MATCH'].sub(/-gzip"$/, '"') end return @app.call(env) end
strip -gzip
from the If-None-Match
HTTP header.