From 2d0ad8b3ed8bbf2451560460965bc084c7b8576e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 1 Feb 2013 10:03:27 +0100 Subject: remove all leading slash of PATH_INFO to get meth --- lib/zorglub/node.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 3cc4d8d..9d71a8c 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -220,7 +220,7 @@ module Zorglub end # def call env - meth, *args = env['PATH_INFO'].sub(/^\//,'').split(/\//) + meth, *args = env['PATH_INFO'].sub(/^\/+/,'').split(/\//) meth ||= 'index' puts "=> #{meth}(#{args.join ','})" if app.opt :debug node = self.new env, meth, args -- cgit v1.1-2-g2b99