From: Daniel Stenberg Date: Tue, 29 Nov 2011 12:41:10 +0000 (+0100) Subject: ftpserver: output CRLF in logs X-Git-Tag: curl-7_24_0~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d72489f0fc2ef6e0f4de88766acfef286605c6a;p=thirdparty%2Fcurl.git ftpserver: output CRLF in logs Previously the log function would just filter out all CR and LF occurances from the log to make it more readable. This had the downside that it made it very hard to see CR LFs when they actually matters. Now, they're instead converted to "[CR]" and "[LR]" in the log to become apparent to readers. --- diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 99722bb8c5..e9f988e8bd 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -327,7 +327,8 @@ sub sendcontrol { my $log; foreach $log (@_) { my $l = $log; - $l =~ s/[\r\n]//g; + $l =~ s/\r/[CR]/g; + $l =~ s/\n/[LF]/g; logmsg "> \"$l\"\n"; } }