From 2cf929fc4ceeb5e8cdec1e9c63f268c9992cdcd3 Mon Sep 17 00:00:00 2001 From: filipe Date: Tue, 11 Dec 2007 22:15:15 +0000 Subject: [PATCH] case... when statment des not allow : anymore in ruby 1.9. Changed it to 'then' , that is compatible with ruby 1.8/1.9 git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@893 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel/handlers.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mongrel/handlers.rb b/lib/mongrel/handlers.rb index e643025a..8b8d5f66 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