summary refs log tree commit
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-11-25 10:51:16 +0100
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-11-25 10:51:56 +0100
commitcabe6b33ca4601aa6acb56317ac1c819cf6dc4bb (patch)
treedd90ce988dece47b0d85980957705acd42565efa
parent1482870b381b1517305c8c0aac05feb4d5b3aa6a (diff)
parentc987ffa268f7f2e11ce4115296d9dc37b3a9e9c1 (diff)
downloadrack-cabe6b33ca4601aa6acb56317ac1c819cf6dc4bb.tar.gz
Merge pull request #973 from mwpastore/master
Update example use of Rack::Deflater
-rw-r--r--lib/rack/deflater.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/deflater.rb b/lib/rack/deflater.rb
index 62a11243..f0fa5e4f 100644
--- a/lib/rack/deflater.rb
+++ b/lib/rack/deflater.rb
@@ -22,7 +22,7 @@ module Rack
     # [app] rack app instance
     # [options] hash of deflater options, i.e.
     #           'if' - a lambda enabling / disabling deflation based on returned boolean value
-    #                  e.g use Rack::Deflater, :if => lambda { |env, status, headers, body| body.length > 512 }
+    #                  e.g use Rack::Deflater, :if => lambda { |env, status, headers, body| body.map(&:bytesize).reduce(0, :+) > 512 }
     #           'include' - a list of content types that should be compressed
     def initialize(app, options = {})
       @app = app