From f8d6cb8bd175e5ab5d6323f73a5c4a55d27d676a Mon Sep 17 00:00:00 2001 From: Scott Steeg Date: Tue, 2 Apr 2019 19:50:46 +0900 Subject: [PATCH] Fallback to empty string as Rails 5.1 can't handle nil paths --- lib/zipkin-tracer/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zipkin-tracer/application.rb b/lib/zipkin-tracer/application.rb index cf95816..532632e 100644 --- a/lib/zipkin-tracer/application.rb +++ b/lib/zipkin-tracer/application.rb @@ -4,7 +4,7 @@ class Application # Determines if our framework knows whether the request will be routed to a controller def self.routable_request?(env) return true unless defined?(Rails) # If not running on a Rails app, we can't verify if it is invalid - path_info = env[ZipkinTracer::RackHandler::PATH_INFO] + path_info = env[ZipkinTracer::RackHandler::PATH_INFO] || "" http_method = env[ZipkinTracer::RackHandler::REQUEST_METHOD] Rails.application.routes.recognize_path(path_info, method: http_method) true