class Rack::Directory

def check_bad_request(path_info)

Rack response to use for requests with invalid paths, or nil if path is valid.
def check_bad_request(path_info)
  return if Utils.valid_path?(path_info)
  body = "Bad Request\n"
  [400, { CONTENT_TYPE => "text/plain",
    CONTENT_LENGTH => body.bytesize.to_s,
    "x-cascade" => "pass" }, [body]]
end