Changeset 893

Show
Ignore:
Timestamp:
12/11/07 17:15:15 (9 months ago)
Author:
filipe
Message:

case... when statment des not allow : anymore in ruby 1.9. Changed it to 'then' , that is compatible with ruby 1.8/1.9

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/mongrel/handlers.rb

    r889 r893  
    206206      # the response would be identical to the last response 
    207207      same_response = case 
    208                       when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil : false 
    209                       when modified_since && last_response_time > Time.now                                  : false 
    210                       when modified_since && mtime > last_response_time                                     : false 
    211                       when none_match     && none_match == '*'                                              : false 
    212                       when none_match     && !none_match.strip.split(/\s*,\s*/).include?(etag)              : false 
     208                      when modified_since && !last_response_time = Time.httpdate(modified_since) rescue nil then false 
     209                      when modified_since && last_response_time > Time.now                                  then false 
     210                      when modified_since && mtime > last_response_time                                     then false 
     211                      when none_match     && none_match == '*'                                              then false 
     212                      when none_match     && !none_match.strip.split(/\s*,\s*/).include?(etag)              then false 
    213213                      else modified_since || none_match  # validation successful if we get this far and at least one of the header exists 
    214214                      end