From 5b3a2622379c01617e0f69597a887c7625fd40de Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 2 Sep 2007 21:48:17 +0000 Subject: [PATCH] Packages::Dispatcher: Handle escaped characters in PATH_INFO correctly Unescape stuff from PATH_INFO before setting CGI parameters to it. Fixes URLs of the form http://packages.debian.org/g++ --- lib/Packages/Dispatcher.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index 7973d0d..64790c1 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -226,8 +226,9 @@ sub do_dispatch { } # else if (@components == 1) if (@components) { - $input->param( 'keywords', $components[0] ); - $input->param( 'package', $components[0] ); + my $c = uri_unescape($components[0]); + $input->param( 'keywords', $c ); + $input->param( 'package', $c ); } } -- 2.39.2