diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 15:46:58 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 15:46:58 +0100 |
commit | b43040967c23574eda987120a419a411516135e8 (patch) | |
tree | 8b5b762f566e3e3ba827e5bcc38919610541c7f5 | |
parent | 6073b38b04e748ffa873d6723154e05da41bc335 (diff) | |
download | zorglub-b43040967c23574eda987120a419a411516135e8.zip zorglub-b43040967c23574eda987120a419a411516135e8.tar.gz |
node: cleanPATH_INFO using sub() instead of arbitrary string index
-rw-r--r-- | lib/zorglub/node.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |