yangtse: curl-www/auto log.cgi,1.25,1.26

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/auto
In directory labb:/tmp/cvs-serv5020/auto

Modified Files:
	log.cgi 
Log Message:
When showing TRANSFER CONTROL line chars, show them as [hex]
if it is the space char or isn't in [a-zA-Z0-9:=_]

Index: log.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/auto/log.cgi,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- log.cgi	26 Feb 2007 19:57:59 -0000	1.25
+++ log.cgi	1 Mar 2007 04:08:04 -0000	1.26
@@ -100,6 +100,17 @@
                 elsif($line =~ /^testcurl: EMAIL/) {
                     $line =~ s:\@: /at/ :g;
                 }
+                elsif($line =~ /^testcurl: TRANSFER CONTROL/) {
+                    $state = 2;
+                }
+                elsif($line =~ /^testcurl: NAME/) {
+                    $state = 1;
+                }
+            }
+            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/)) {
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.