1CURLOPT_HTTP09_ALLOWED(3) curl_easy_setopt options CURLOPT_HTTP09_ALLOWED(3)
2
3
4
6 CURLOPT_HTTP09_ALLOWED - allow HTTP/0.9 response
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long allowed);
12
14 Pass the long argument allowed set to 1L to allow HTTP/0.9 responses.
15
16 An HTTP/0.9 response is a server response entirely without headers and
17 only a body. You can connect to lots of random TCP services and still
18 get a response that curl might consider to be HTTP/0.9!
19
21 curl allowed HTTP/0.9 responses by default before 7.66.0
22
23 Since 7.66.0, libcurl requires this option set to 1L to allow HTTP/0.9
24 responses.
25
27 HTTP
28
30 CURL *curl = curl_easy_init();
31 if(curl) {
32 CURLcode ret;
33 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
34 curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
35 ret = curl_easy_perform(curl);
36 }
37
39 Option added in 7.64.0, present along with HTTP.
40
42 Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
43
45 CURLOPT_SSLVERSION(3), CURLOPT_HTTP_VERSION(3),
46
47
48
49libcurl 7.85.0 May 17, 2022 CURLOPT_HTTP09_ALLOWED(3)