use LWP::UserAgent;
use DB_File;
use Compress::Zlib;
+use URI::Escape;
#CSC: mancano i controlli sulle condizioni di errore di molte funzioni
#CSC: ==> non e' robusto
while (my $r = $c->get_request) {
#CSC: mancano i controlli di sicurezza
- my $inputuri = $r->url;
+ my $inputuri = uri_unescape($r->url);
$inputuri =~ s/^[^?]*\?uri=(.*)/$1/;
print "\nRequest: ".$r->url."\n\n";
my $http_method = $r->method;
my $http_path = $r->url->path;
- my $http_query = $r->url->query;
+ my $http_query = uri_unescape($r->url->query);
+
+ print "\nUnescaped query: ".$http_query."\n";
if ($http_method eq 'GET' and $http_path eq "/getciconly") {
# finds the uri, url and filename