Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #196 from mmb/issue_195_cache_control_nil

Issue 195 cache control nil
  • Loading branch information...
commit 28842366aef7b086f251dd274251e9dc40c11d3a 2 parents d0e8aed + 454360e
@rkh rkh authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/rack/etag.rb
View
5 lib/rack/etag.rb
@@ -9,7 +9,7 @@ module Rack
#
# On initialization, you can pass two parameters: a Cache-Control directive
# used when Etag is absent and a directive when it is present. The first
- # defaults to nil, while the second defaults to "max-age=0, privaute, must-revalidate"
+ # defaults to nil, while the second defaults to "max-age=0, private, must-revalidate"
class ETag
DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate".freeze
@@ -28,7 +28,8 @@ def call(env)
end
unless headers['Cache-Control']
- headers['Cache-Control'] = digest ? @cache_control : @no_cache_control
+ headers['Cache-Control'] =
+ (digest ? @cache_control : @no_cache_control) || []
end
[status, headers, body]
Please sign in to comment.
Something went wrong with that request. Please try again.