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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d72489f0fc2ef6e0f4de88766acfef286605c6a;p=curl 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 99722bb8c..e9f988e8b 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"; } }