- my ($modestring, $ur, $uw, $ux, $gr, $gw, $gx, $or, $ow, $ox);
- my $mode = shift;
-
- $ur = ($mode & 0400) ? "r" : "-"; # User Read
- $uw = ($mode & 0200) ? "w" : "-"; # User Write
- $ux = ($mode & 0100) ? "x" : "-"; # User eXecute
- $gr = ($mode & 0040) ? "r" : "-"; # Group Read
- $gw = ($mode & 0020) ? "w" : "-"; # Group Write
- $gx = ($mode & 0010) ? "x" : "-"; # Group eXecute
- $or = ($mode & 0004) ? "r" : "-"; # Other Read
- $ow = ($mode & 0002) ? "w" : "-"; # Other Write
- $ox = ($mode & 0001) ? "x" : "-"; # Other eXecute
-
- # build a readable mode string (rwxrwxrwx)
- return $ur . $uw . $ux . $gr . $gw . $gx . $or . $ow . $ox;
+ my $params = shift;
+ my @list;
+
+ while(my ($param,$value) = each(%$params))
+ {
+ push(@list,$param."=".$value);
+ }
+
+ my $query = join("&",@list);
+ my $header = redirect("http://$ENV{'HTTP_HOST'}$ENV{'SCRIPT_NAME'}?$query");
+
+ return \$header;