Update of /cvsroot/curl/curl-www/auto
In directory labb:/tmp/cvs-serv1957/auto
Modified Files:
log.cgi
Log Message:
quoted-printable decoding and soft line break magic is now
done in the autobuild inpipe mail script.
Show the transfer control line only if it is not complete,
this is an indication of an inproper build log file format
or an inpipe problem.
Index: log.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/auto/log.cgi,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- log.cgi 1 Mar 2007 04:08:04 -0000 1.26
+++ log.cgi 13 Mar 2007 13:34:45 -0000 1.27
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
use strict;
use MIME::QuotedPrint ();
@@ -31,56 +33,22 @@
my $build = "inbox/build-$id.log";
-# find out if log file is quoted-printable encoded
-my $qpencoded = 0;
-if(open(SCAN, "<$build")) {
- my $linecount;
- my $mimecount;
- while(<SCAN>) {
- if($_ =~ /^testcurl: [A-Z]+ =3D/) {
- if($mimecount++ > 3) {
- $qpencoded = 1;
- last;
- }
- }
- last if($linecount++ > 18);
- }
- close(SCAN);
-}
-
my $date;
my $timestamp;
my $description;
-if(open(FILE, "<$build")) {
+if(open(my $logfile, "<$build")) {
#
&initwarn();
#
my @out;
my $num = 0;
my $state = 0;
- my $buffer = "";
#
push @out, "\n<div class=\"mini\">\n";
#
- while(my $chunk = <FILE>) {
- my $line;
- # decode quoted-printable if encoded
- if($qpencoded) {
- $buffer .= MIME::QuotedPrint::decode_qp($chunk);
- if($buffer =~ /\n$/) {
- $line = $buffer;
- $buffer = "";
- }
- else {
- next; # chunk
- }
- }
- elsif(!$line) {
- # if not qp encoded and ref is not set yet,
- # set line as ref to chunk to avoid copy.
- $line = "@{[$chunk]}";
- }
+ while(my $line = <$logfile>) {
+ #
chomp $line;
#
if($state) {
@@ -101,6 +69,10 @@
$line =~ s:\@: /at/ :g;
}
elsif($line =~ /^testcurl: TRANSFER CONTROL/) {
+ if($line =~ /^testcurl: .+ CHAR LINEo{1066}LINE_END/) {
+ # Don't show the transfer control line if complete
+ next;
+ }
$state = 2;
}
elsif($line =~ /^testcurl: NAME/) {
@@ -108,9 +80,7 @@
}
}
if($state == 2) {
- my $nlend = ($line =~ /\n$/);
$line =~ s/([^a-zA-Z0-9:=_]{1}?)/sprintf("[%02X]",ord($1))/ge;
- $line .= "\n" if($nlend);
}
#
if(checkwarn($line) || ($line =~ /FAILED/) || ($line =~ /MEMORY FAILURE/)) {
@@ -126,7 +96,7 @@
next;
}
}
- close(FILE);
+ close($logfile);
#
push @out, "</div>\n"; # end of mini-div
#
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.