Permalink
Browse files

Make AbstractRequest.if_modified_sense return nil if the header could…

… not be parsed
  • Loading branch information...
1 parent bd7edcf commit 6e4ea66dc0d41ef611e2b2187e940321f5dc748a @jamis jamis committed Aug 19, 2008
Showing with 3 additions and 1 deletion.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −1 actionpack/lib/action_controller/request.rb
View
@@ -1,5 +1,7 @@
*Edge*
+* Made AbstractRequest.if_modified_sense return nil if the header could not be parsed [Jamis Buck]
+
* Added back ActionController::Base.allow_concurrency flag [Josh Peek]
* AbstractRequest.relative_url_root is no longer automatically configured by a HTTP header. It can now be set in your configuration environment with config.action_controller.relative_url_root [Josh Peek]
@@ -100,7 +100,7 @@ def accepts
def if_modified_since
if since = env['HTTP_IF_MODIFIED_SINCE']
- Time.rfc2822(since)
+ Time.rfc2822(since) rescue nil
end
end
memoize :if_modified_since

0 comments on commit 6e4ea66

Please sign in to comment.