1CURLOPT_HTTP09_ALLOWED(3)  curl_easy_setopt options  CURLOPT_HTTP09_ALLOWED(3)
2
3
4

NAME

6       CURLOPT_HTTP09 - allow HTTP/0.9 response
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_setopt(CURL  *handle,  CURLOPT_HTTP09_ALLOWED, long
12       allowed);
13

DESCRIPTION

15       Pass the long argument allowed set to 1L to allow HTTP/0.9 responses.
16
17       A HTTP/0.9 response is a server response entirely without  headers  and
18       only  a  body, while you can connect to lots of random TCP services and
19       still get a response that curl might consider to be HTTP/0.9.
20

DEFAULT

22       curl allows HTTP/0.9 responses by default.
23
24       A future curl version will require this  option  to  be  set  to  allow
25       HTTP/0.9 responses.
26

PROTOCOLS

28       HTTP
29

EXAMPLE

31       CURL *curl = curl_easy_init();
32       if(curl) {
33         CURLcode ret;
34         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
35         curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
36         ret = curl_easy_perform(curl);
37       }
38

AVAILABILITY

40       Option added in 7.64.0, present along with HTTP.
41

RETURN VALUE

43       Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
44

SEE ALSO

46       CURLOPT_SSLVERSION(3), CURLOPT_HTTP_VERSION(3),
47
48
49
50libcurl 7.64.0                 December 17, 2018     CURLOPT_HTTP09_ALLOWED(3)
Impressum