Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Document Rack::Deflater #509

Merged
merged 1 commit into from

2 participants

@oscardelben

No description provided.

@raggi raggi merged commit ad80ab7 into rack:master

1 check failed

Details default The Travis build could not complete due to an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 3, 2013
  1. @oscardelben
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/rack/deflater.rb
View
12 lib/rack/deflater.rb
@@ -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
Something went wrong with that request. Please try again.