}
$post = /\nPOST\s/;
if (/^\n*(CONNECT|CONTINUE).*\s\[([\d_]+)\]/i) { $pid = $2 }
- if (/\n(POST|GET)\s+\/(\w+)/i) { $cgi = $2 }
+ if (/\n(POST|GET)\s+(\S+)/i) {
+ $cgi = $2;
+ $cgi =~ s:.*/::;
+ $cgi =~ s:\?.*::;
+ }
if (/Content-Length: (\d+)/i) {
$d = $1;
while ($d =~ s/(\d)(\d\d\d\b)/$1,$2/) {};
binmode($log,":utf8");
while (<$log>) {
s/\r//;
+ s/[^\x09\x20-\xFF]/_/g;
if (/^Content-Disposition:.*name="FILE".*filename="(.+)"/i) {
print " FILE=\"$1\"\n";
} elsif (/^Content-Disposition:.*name="(\w+)"/i) {