From b43040967c23574eda987120a419a411516135e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 15:46:58 +0100 Subject: node: cleanPATH_INFO using sub() instead of arbitrary string index --- 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 eee5c0e..a83454f 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -40,7 +40,7 @@ module Zorglub end # def call env - meth, *args = env['PATH_INFO'][1..-1].split '/' + meth, *args = env['PATH_INFO'].sub(/^\//,'').split '/' meth||= 'index' node = self.new env, {:engine=>engine,:layout=>layout,:view=>r(meth),:method=>meth,:args=>args} return error_404 node if not node.respond_to? meth -- cgit v1.1-2-g2b99