correctly decode url escape -- should I move to real http server like Mojo?
[pxelator] / 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) ) {