From: Frank Lichtenheld Date: Sun, 2 Sep 2007 21:48:17 +0000 (+0000) Subject: Packages::Dispatcher: Handle escaped characters in PATH_INFO correctly X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=5b3a2622379c01617e0f69597a887c7625fd40de;p=deb%2Fpackages.git 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++ --- 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 ); } }