1---
2c: Copyright (C) Daniel Stenberg, <daniel.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)
10---
11
12# NAME
13
14CURLOPT_CRLF - CRLF conversion
15
16# SYNOPSIS
17
18~~~c
19#include <curl/curl.h>
20
21CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
22~~~
23
24# DESCRIPTION
25
26Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
27CRLF newlines on transfers. Disable this option again by setting the value to
280 (zero).
29
30This is a legacy option of questionable use.
31
32# DEFAULT
33
340
35
36# PROTOCOLS
37
38All
39
40# EXAMPLE
41
42~~~c
43int main(void)
44{
45  CURL *curl = curl_easy_init();
46  if(curl) {
47    CURLcode ret;
48    curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
49    curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
50    ret = curl_easy_perform(curl);
51    curl_easy_cleanup(curl);
52  }
53}
54~~~
55
56# AVAILABILITY
57
58SMTP since 7.40.0, other protocols since they were introduced
59
60# RETURN VALUE
61
62Returns CURLE_OK
63