# File lib/rack/etag.rb, line 22 def call(env) status, headers, body = @app.call(env) if etag_status?(status) && etag_body?(body) && !skip_caching?(headers) digest, body = digest_body(body) headers['ETag'] = %("#{digest}") if digest end unless headers['Cache-Control'] if digest headers['Cache-Control'] = @cache_control if @cache_control else headers['Cache-Control'] = @no_cache_control if @no_cache_control end end [status, headers, body] end