def test_GET_range_if_unmodified_since_412_Precondition_Failed
mtime = File.mtime('test/index.html')
mtime -= 1
@request.method = 'GET'
@request.path = '/index.html'
@request.version = 'HTTP/1.1'
@request.set_header('Range', 'bytes=7-')
@request.set_header('If-Unmodified-Since', mtime.httpdate)
@local_doc.publish('', @request, @response, self)
assert_equal('/index.html', @messg_head.doc_path)
assert_match(@messg_head.local_path, %"test/index\.html$")
assert_equal('HTTP/1.1', @messg_head.version)
assert_equal(412, @messg_head.status)
assert_equal('Precondition Failed', @messg_head.reason)
assert(@messg_body.empty?)
assert(@log_emerg.empty?)
assert(@log_alert.empty?)
assert(@log_crit.empty?)
assert(@log_err.empty?)
assert(@log_warning.empty?)
assert(@log_notice.empty?)
assert(@log_info.empty?)
assert_match(@log_debug, /enter document: Rucy::LocalFileDocument/)
end