diff options
Diffstat (limited to 'orig')
-rw-r--r-- | orig/minimun | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/orig/minimun b/orig/minimun index f6f9407..d4e2b7d 100644 --- a/orig/minimun +++ b/orig/minimun @@ -7,14 +7,14 @@ use File::Copy; chdir('/tmp'); -$buffer, %FORM; +my($buffer, %FORM); if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; } -@pairs = split(/&/, $buffer); +my @pairs = split(/&/, $buffer); -foreach $pair (@pairs) { +foreach my $pair (@pairs) { my ($name, $val) = split(/=/, $pair); $val =~ tr/+/ /; $val =~ s/%(..)/pack("C", hex($1))/eg; @@ -22,7 +22,7 @@ foreach $pair (@pairs) { $FORM{$name} = $val; } -($fh, $filename) = tempfile(UNLINK => 1); +my ($fh, $filename) = tempfile(UNLINK => 1); copy("%%DEST%%/format.tex",$fh); print $fh "\n"; @@ -43,12 +43,12 @@ else{ say $fh "\\bye"; system ('/usr/bin/pdftex', $filename); -open(DOC, '<', "$filename.pdf") or { +open(DOC, '<', "$filename.pdf") or do { print "Content-type: text/html\n"; print "Status: 400 Bad Request Error\n\n"; print '<h1>400 Bad Request</h1>'; die; -} +}; print "Content-type: application/pdf\n\n"; print <DOC>; close(DOC); |