curl-users
Why does curl use CRLF line terminators for its --dump-header option?
Date: Thu, 26 Apr 2012 02:56:07 -0400
So I was just using curl and I banged my head against the wall for about 30
minutes trying to figure out why my script wasn't working properly, and
then I realized that --dump-header uses CRLF line terminators. Any chance
of getting this changed to unix line endings in a future release?
Curl version:
tom_at_tralfamadore ~/Fun $ curl --version
curl 7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e
zlib/1.2.3.4libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s
rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
This is the latest curl in Linux Mint 12.
Proof of concept
#!/bin/bash
curl http://google.com --dump-header foo &>/dev/null
file foo
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-26