lib/sidekiq/web/router.rb in sidekiq-4.2.4 vs lib/sidekiq/web/router.rb in sidekiq-4.2.5
- old
+ new
@@ -43,9 +43,13 @@
def match(env)
request_method = env[REQUEST_METHOD]
path_info = ::Rack::Utils.unescape env[PATH_INFO]
+ # There are servers which send an empty string when requesting the root.
+ # These servers should be ashamed of themselves.
+ path_info = "/" if path_info == ""
+
@routes[request_method].each do |route|
if params = route.match(request_method, path_info)
env[ROUTE_PARAMS] = params
return WebAction.new(env, route.block)