X-Git-Url: https://git.treefish.org/fex.git/blobdiff_plain/97b87610331f53e756d032ad21db786037f921a1..e5c93609849bda051fff54b5d5265af5608c6c69:/cgi-bin/pup?ds=sidebyside diff --git a/cgi-bin/pup b/cgi-bin/pup index 241e2d3..0d00509 100755 --- a/cgi-bin/pup +++ b/cgi-bin/pup @@ -34,7 +34,7 @@ chdir $spooldir or http_die("$spooldir - $!\n"); my $qs = $ENV{QUERY_STRING}; (my $multi) = $qs =~ s/(^|&)multi//; - + # parse HTTP QUERY_STRING (parameter=value pairs) if ($qs) { foreach (split '&',$qs) { @@ -48,7 +48,7 @@ if ($qs) { ord($1) )); } - setparam($x,$_); + setparam($x,$_); } } } @@ -62,7 +62,7 @@ if ($ENV{REQUEST_METHOD} eq 'POST') { } binmode(STDIN,':raw'); - + READPOST: while (&nvt_read) { if (/^Content-Disposition:\s*form-data;\s*name="([a-z]\w*)"/i) { my $x = $1; @@ -95,7 +95,7 @@ if ($to and $from and checkaddress($from)) { exec($FEXHOME.'/bin/fexsrv') if $ENV{KEEP_ALIVE}; exit; } - + http_header('200 ok'); print html_header($head); @@ -172,11 +172,11 @@ pq(qq( # set parameter variables sub setparam { my ($v,$vv) = @_; - + $v = uc(despace($v)); if ($v eq 'LOCALE' and $vv =~ /^(\w+)$/) { $locale = $1; - } elsif ($v eq 'FROM') { + } elsif ($v eq 'FROM') { $from = normalize_email($vv); } elsif ($v eq 'TO') { $to = normalize_email($vv);