diff options
author | filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-12-11 22:15:15 +0000 |
---|---|---|
committer | filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-12-11 22:15:15 +0000 |
commit | 9853840261633f25dce66ebb8130e6f36f9dcd81 (patch) | |
tree | df5ff72ffd1ad0946b14862d825da341e60cac79 | |
parent | 28f593240e45ffd86de01a0903c534d38ad4281b (diff) | |
download | unicorn-9853840261633f25dce66ebb8130e6f36f9dcd81.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@893 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r-- | lib/mongrel/handlers.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index ccd6129..f7db97a 100644 --- a/lib/mongrel/handlers.rb +++ b/lib/mongrel/handlers.rb @@ -205,11 +205,11 @@ module Mongrel # test to see if this is a conditional request, and test if # the response would be identical to the last response same_response = case - when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil : false - when modified_since && last_response_time > Time.now : false - when modified_since && mtime > last_response_time : false - when none_match && none_match == '*' : false - when none_match && !none_match.strip.split(/\s*,\s*/).include?(etag) : false + when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil then false + when modified_since && last_response_time > Time.now then false + when modified_since && mtime > last_response_time then false + when none_match && none_match == '*' then false + when none_match && !none_match.strip.split(/\s*,\s*/).include?(etag) then false else modified_since || none_match # validation successful if we get this far and at least one of the header exists end |