vendor/bundle/ruby/1.8/gems/sinatra-1.2.8/lib/sinatra/base.rb
def last_modified(time)
      return unless time
      time = time_for time
      response['Last-Modified'] = time.httpdate
      # compare based on seconds since epoch
      halt 304 if Time.httpdate(env['HTTP_IF_MODIFIED_SINCE']).to_i >= time.to_i
    rescue ArgumentError
    end
# Set the last modified time of the resource (HTTP 'Last-Modified' header)
# and halt if conditional GET matches. The +time+ argument is a Time,
# DateTime, or other object that responds to +to_time+.
#
# When the current request includes an 'If-Modified-Since' header that is
# equal or later than the time specified, execution is immediately halted
# with a '304 Not Modified' response.
Set the last modified time of the resource (HTTP 'Last-Modified' header)
and halt if conditional GET matches. The +time+ argument is a Time,
DateTime, or other object that responds to +to_time+.

When the current request includes an 'If-Modified-Since' header that is
equal or later than the time specified, execution is immediately halted
with a '304 Not Modified' response.
Set the last modified time of the resource ( HTTP ' Last - Modified ' header ) and halt if conditional GET matches . The + time + argument is a Time DateTime or other object that responds to + to_time + . When the current request includes an ' If - Modified - Since ' header that is equal or later than the time specified execution is immediately halted with a ' 304 Not Modified ' response .
def last_modified(time)
      return unless time
      time = time_for time
      response['Last-Modified'] = time.httpdate
      halt 304 if Time.httpdate(env['HTTP_IF_MODIFIED_SINCE']).to_i >= time.to_i
    rescue ArgumentError
    end
def last_modified ( time ) return unless time time = time_for time response [ 'Last-Modified' ] = time . httpdate halt 304 if Time . httpdate ( env [ 'HTTP_IF_MODIFIED_SINCE' ] ) . to_i >= time . to_i rescue ArgumentError end
Set the last modified time of the resource (HTTP 'Last-Modified' header)
and halt if conditional GET matches.
Set the last modified time of the resource ( HTTP ' Last - Modified ' header ) and halt if conditional GET matches .
# compare based on seconds since epoch
time