+ else
+ {
+ # Simple HTTP
+
+ $protocol = "http";
+ $port = ($ENV{'SERVER_PORT'} == 80) ? "" : ":".$ENV{'SERVER_PORT'};
+ }
+
+ # The following code is grabbed from Template::_query of
+ # Andre Malo's selfforum (http://sourceforge.net/projects/selfforum/)
+ # and modified by Patrick Canterino
+
+ my $query = '?'.join ('&' =>
+ map {
+ (ref)
+ ? map{escape ($_).'='.escape ($params -> {$_})} @{$params -> {$_}}
+ : escape ($_).'='.escape ($params -> {$_})
+ } keys %$params
+ );
+
+ # Create the redirection header