1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

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
This commit is contained in:
filipe 2007-12-11 22:15:15 +00:00 committed by Luis Lavena
parent 94a93a44c2
commit 2cf929fc4c

View file

@ -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