-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curl 8.10 Directory Listing to File Uses LF instead of CRLF #14873
Comments
On what version did you see other behaviour? I don't get any CRs in any version I tried back to 7.61.1, which is 6 years ago.
|
I been using curl even before v7.6 to get FTP directory lists into a file and they always had CRLF line endings before v8.10. Did you look at the output file created from the example under Windows? Even loading the output file created with v8.10 into Notpad shows Unix LF encoding in the status bar but Windows CRLF encoding with the output file created with 8.9 and earlier. Something has changed with v8.10. |
I was testing under Linux. Does anything different happen with --use-ascii?
Does it happen if commit eeb7c12 is reverted?
|
--use-ascii has no effect With Windows the example output file under v8.9 and earlier is 596 bytes, but only 589 bytes under v8.10. Clearly since the example output file has 7 lines, v8.10 is missing the CR per line. For now I solved this issue by splitting the lines by LF if no CRLF. |
Not able to do this. |
Can you try the Windows binary here? It's the one from the day before that
commit was submitted:
https://github.com/curl/curl-for-win/actions/runs/10603983606
|
Yes, that version works. |
I did this
curl ftp.funet.fi/ -o list.txt
I expected the following
Output file with CRLF line terminations instead of LF only.
Is this supposed to be the new default behavior now?
Default was CRLF in v8.9 and earlier versions.
Breaks everything that was expecting CRLF since forever.
curl/libcurl version
curl 8.10.0 (x86_64-w64-mingw32) libcurl/8.10.0 LibreSSL/3.9.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 WinIDN libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 ngtcp2/1.7.0 nghttp3/1.5.0
Release-Date: 2024-09-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets zstd
operating system
Windows 10 Pro 64 22H2
The text was updated successfully, but these errors were encountered: