Skip to content
Browse files

Ensure Cache-Control max-age is an integer

  • Loading branch information...
1 parent ad26f06 commit de40bc033a64c7074e01a8e8c585225f4cdaf81e @jeremy jeremy committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 actionpack/lib/action_dispatch/http/response.rb
  2. +1 −1 actionpack/test/controller/render_test.rb
View
2 actionpack/lib/action_dispatch/http/response.rb
@@ -270,7 +270,7 @@ def set_conditional_cache_control!
max_age = control[:max_age]
options = []
- options << "max-age=#{max_age}" if max_age
+ options << "max-age=#{max_age.to_i}" if max_age
options << (control[:public] ? "public" : "private")
options << "must-revalidate" if control[:must_revalidate]
options.concat(extras) if extras
View
2 actionpack/test/controller/render_test.rb
@@ -54,7 +54,7 @@ def conditional_hello_with_public_header_and_expires_at
end
def conditional_hello_with_expires_in
- expires_in 1.minute
+ expires_in 60.1.seconds
render :action => 'hello_world'
end

0 comments on commit de40bc0

Please sign in to comment.
Something went wrong with that request. Please try again.