GNURLOPT_CRLF(3)
π GNURLOPT_CRLF β the "newline glow-up" page
ok so this is from the curl_easy_setopt options manual (the GNURLOPT_CRLF(3) one, you're in the right place bestie π«Ά), and honestly? it's a whole little vibe check on line endings.
β¨ NAME β¨
CURLOPT_CRLF β enable/disable CRLF conversion. like, do you want your newlines to get a makeover mid-transfer or not π«
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
π¦ DESCRIPTION π¦
okay so you pass a long here. that's it. that's the whole thing.
If the value is set to 1 (one), libcurl converts Unix newlines to CRLF newlines on transfers. slay. and if you want to turn it off again you just set the value to 0 (zero), no biggie β¨
This is a legacy option of questionable use. not me saying that, the manpage says it. it's giving "grandfathered in" energy π
π DEFAULT π
0
(off by default, the way it should be π)
π PROTOCOLS π
All π β every single one, no gatekeeping.
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
literally copy-paste coded, iconic π
β AVAILABILITY β
SMTP since 7.40.0, other protocols since they were introduced. iykyk π§
π RETURN VALUE π
Returns CURLE_OK. that's it, that's the return, she's simple and she ate π
π SEE ALSO π
and that's the whole page bestie π β brought to you by libcurl 7.37.0, dated 17 Jun 2014, and yeah the footer says GNURLOPT_CRLF(3) again but we already knew that π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms