correctly decode url escape -- should I move to real http server like Mojo?
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Aug 2009 19:44:38 +0000 (19:44 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 28 Aug 2009 19:44:38 +0000 (19:44 +0000)
lib/PXElator/httpd.pm

index 24c2a68..c1c4343 100644 (file)
@@ -371,6 +371,7 @@ sub start {
 
                if ($request =~ m{^GET (/.*) HTTP/1.[01]}) {
                        my $path = $1;
+                       $path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/ge;
                        my $param;
                        if ( $path =~ s{\?(.+)}{} ) {
                                foreach my $p ( split(/[&;]/, $1) ) {