xref: /curl/docs/libcurl/opts/CURLOPT_CRLF.md (revision e3fe0200)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_CRLF
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_CONV_FROM_NETWORK_FUNCTION (3)
9  - CURLOPT_CONV_TO_NETWORK_FUNCTION (3)
10Protocol:
11  - All
12---
13
14# NAME
15
16CURLOPT_CRLF - CRLF conversion
17
18# SYNOPSIS
19
20~~~c
21#include <curl/curl.h>
22
23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
24~~~
25
26# DESCRIPTION
27
28Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
29CRLF newlines on transfers. Disable this option again by setting the value to
300 (zero).
31
32This is a legacy option of questionable use.
33
34# DEFAULT
35
360
37
38# EXAMPLE
39
40~~~c
41int main(void)
42{
43  CURL *curl = curl_easy_init();
44  if(curl) {
45    CURLcode ret;
46    curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
47    curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
48    ret = curl_easy_perform(curl);
49    curl_easy_cleanup(curl);
50  }
51}
52~~~
53
54# AVAILABILITY
55
56SMTP since 7.40.0, other protocols since they were introduced
57
58# RETURN VALUE
59
60Returns CURLE_OK
61