lib/rack/deflater.rb in rack-1.4.7 vs lib/rack/deflater.rb in rack-1.5.0.beta.1

- old
+ new

@@ -14,10 +14,11 @@ headers = Utils::HeaderHash.new(headers) # Skip compressing empty entity body responses and responses with # no-transform set. if Utils::STATUS_WITH_NO_ENTITY_BODY.include?(status) || - headers['Cache-Control'].to_s =~ /\bno-transform\b/ + headers['Cache-Control'].to_s =~ /\bno-transform\b/ || + (headers['Content-Encoding'] && headers['Content-Encoding'] !~ /\bidentity\b/) return [status, headers, body] end request = Request.new(env)