Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #509 from oscardelben/document_deflater

Document Rack::Deflater
  • Loading branch information...
commit ad80ab7dcd27dd85047aeabb57bdfd9623680125 2 parents fccf545 + 79d35c4
James Tucker raggi 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.