1CURLOPT_HTTP09_ALLOWED(3) curl_easy_setopt options CURLOPT_HTTP09_ALLOWED(3)
2
3
4
6 CURLOPT_HTTP09 - allow HTTP/0.9 response
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long
12 allowed);
13
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. You can connect to lots of random TCP services and still
19 get a response that curl might consider to be HTTP/0.9!
20
22 curl allowed HTTP/0.9 responses by default before 7.66.0
23
24 Since 7.66.0, libcurl requires this option set to 1L to allow HTTP/0.9
25 responses.
26
28 HTTP
29
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
40 Option added in 7.64.0, present along with HTTP.
41
43 Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
44
46 CURLOPT_SSLVERSION(3), CURLOPT_HTTP_VERSION(3),
47
48
49
50libcurl 7.76.1 November 04, 2020 CURLOPT_HTTP09_ALLOWED(3)