xref: /curl/docs/libcurl/opts/CURLOPT_CRLF.md (revision 5a488251)
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
12Added-in: 7.1
13---
14
15# NAME
16
17CURLOPT_CRLF - CRLF conversion
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
25~~~
26
27# DESCRIPTION
28
29Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
30CRLF newlines on transfers. Disable this option again by setting the value to
310 (zero).
32
33This is a legacy option of questionable use.
34
35# DEFAULT
36
370
38
39# %PROTOCOLS%
40
41# EXAMPLE
42
43~~~c
44int main(void)
45{
46  CURL *curl = curl_easy_init();
47  if(curl) {
48    CURLcode ret;
49    curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
50    curl_easy_setopt(curl, CURLOPT_CRLF, 1L);
51    ret = curl_easy_perform(curl);
52    curl_easy_cleanup(curl);
53  }
54}
55~~~
56
57# %AVAILABILITY%
58
59# RETURN VALUE
60
61Returns CURLE_OK
62