Skip to content

Commit

Permalink
Fallback to empty string as Rails 5.1 can't handle nil paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ssteeg-mdsol committed Apr 2, 2019
1 parent 717afa5 commit f8d6cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zipkin-tracer/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8d6cb8

Please sign in to comment.