diff options
Diffstat (limited to 'scripts/multipart/multipart.cgi.in')
-rw-r--r-- | scripts/multipart/multipart.cgi.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/multipart/multipart.cgi.in b/scripts/multipart/multipart.cgi.in index 8792c7d..1c92d70 100644 --- a/scripts/multipart/multipart.cgi.in +++ b/scripts/multipart/multipart.cgi.in @@ -16,10 +16,10 @@ $MIME_TYPE = "$ENV{'HOME'}/.mime.types"; $SCRIPT_NAME = $ENV{'SCRIPT_NAME'} || $0; $CGI = "file://$SCRIPT_NAME"; -if (defined($ENV{'QUERY_STRING'})) { - $query = $ENV{'QUERY_STRING'}; -} elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { +if ($ENV{'REQUEST_METHOD'} eq 'POST') { sysread(STDIN, $query, $ENV{'CONTENT_LENGTH'}); +} elsif (defined($ENV{'QUERY_STRING'})) { + $query = $ENV{'QUERY_STRING'}; } if (defined($query)) { for (split('&', $query)) { @@ -192,7 +192,7 @@ while(! $end) { } else { $name = "Content"; } - print "<form method=POST action=\"$qcgi\">\n"; + print "<form method=POST action=\"$qcgi?$count\">\n"; print "<input type=hidden name=file value=\"$qfile\">\n"; print "<input type=hidden name=boundary value=\"$qboundary\">\n"; print "<input type=hidden name=count value=\"$count\">\n"; |