Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document Rack::Deflater

  • Loading branch information...
commit 79d35c4b814270279d8b7873a72222486ffa1ba1 1 parent 5c8a5b7
Oscar Del Ben oscardelben authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/rack/deflater.rb
12 lib/rack/deflater.rb
View
@@ -4,6 +4,18 @@
require 'rack/utils'
module Rack
+ # This middleware enables compression of http responses.
+ #
+ # Currently supported compression algorithms:
+ #
+ # * gzip
+ # * deflate
+ # * identity (no transformation)
+ #
+ # The middleware automatically detects when compression is supported
+ # and allowed. For example no transformation is made when a cache
+ # directive of 'no-transform' is present, or when the response status
+ # code is one that doesn't allow an entity body.
class Deflater
def initialize(app)
@app = app
Please sign in to comment.
Something went wrong with that request. Please try again.