cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Broken libcurl FTP list parsing

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 5 Jan 2014 15:25:59 +0100 (CET)

On Sun, 5 Jan 2014, Steve Holme wrote:

> What was also quite interesting from the log files Daniel sent me was that
> ftp_sockdata.log showed that \r\n was sent by the server but the data /
> datacheck elements in the tests only contain \n. I don't know FTP that well
> so is there some conversion / line ending strip that takes place as trace100
> only shows the data with \n on linux? I know I have \r\n in the <data>
> element for most of the email tests.

I considered this and fought a bit with myself before I decided to push
anyway.

I believe the reason is that LIST is done after TYPE A is sent by libcurl
(ascii mode), and then it converts CRLF to LF before storing the data and then
the comparison has to be done without the CRs. On windows, converting CRLF to
plain LF is probably to be considered the wrong thing...

My primary reason for the test change is however to be able to write tests for
the FTP list parser!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-05