提交 de40bc03 编写于 作者: J Jeremy Kemper

Ensure Cache-Control max-age is an integer

上级 ad26f066
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册