Sha256: 0644b597026c23acd9cc261750d34866d8df6a54c73c6e9b05c3d58f8c127226
Contents?: true
Size: 493 Bytes
Versions: 12
Compression:
Stored size: 493 Bytes
Contents
module Rack class UnhandledRequest class UnhandledRequestError < ArgumentError attr_reader :uri def initialize(uri) @uri = uri super "request for URI '#{uri}' was not handled by the server" end end def initialize(app) @app = app end def call(env) status, headers, body = @app.call(env) raise UnhandledRequestError, env['SCRIPT_NAME'] + env['PATH_INFO'] if body == [] and (status == 200 or status == 404) [status, headers, body] end end end
Version data entries
12 entries across 12 versions & 1 rubygems