1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Use #Integer (thank you, @rkh)

This commit is contained in:
George 2013-09-25 16:34:57 +04:00 committed by Blake Watters
parent d8876cff0a
commit 816c0812f3

View file

@ -366,7 +366,7 @@ module Sinatra
result = file.serving env
result[1].each { |k,v| headers[k] ||= v }
headers['Content-Length'] = result[1]['Content-Length']
opts[:status] = opts[:status].to_i if opts[:status].is_a?(String)
opts[:status] &&= Integer(opts[:status])
halt opts[:status] || result[0], result[2]
rescue Errno::ENOENT
not_found