diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-10-07 21:09:07 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-10-07 21:09:07 +0200 |
commit | aec391621b6af7af1e0ba61c993bbdd88624eac3 (patch) | |
tree | ea6791cfb67800cf119945befc7c1bafb0fea9d5 /actionpack/lib | |
parent | 5556db22c57294a9f4e2ee4e633834ec6a200242 (diff) | |
download | rails-aec391621b6af7af1e0ba61c993bbdd88624eac3.tar.gz rails-aec391621b6af7af1e0ba61c993bbdd88624eac3.tar.bz2 rails-aec391621b6af7af1e0ba61c993bbdd88624eac3.zip |
Make sure last_modified! works with <= rather than just equality.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 413f6d48e5..3ede681253 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -969,7 +969,9 @@ module ActionController #:nodoc: # If-Modified-Since request header is <= last modified. def last_modified!(utc_time) response.last_modified= utc_time - head(:not_modified) if response.last_modified == request.if_modified_since + if request.if_modified_since && request.if_modified_since <= utc_time + head(:not_modified) + end end # Sets the ETag response header. Returns 304 Not Modified if the |