CURLOPT_HTTP09_ALLOWED3
Allow http/0.9 response
Usage
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long allowed);
Overview
Pass the long argument allowed set to 1L to allow HTTP/0.9 responses.
An HTTP/0.9 response is a server response entirely without headers and only a body. You can connect to lots of random TCP services and still get a response that curl might consider to be HTTP/0.9.
Default
0
Protocols
This functionality affects http only
Examples
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
result = curl_easy_perform(curl);
}
}
Return value
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).
Releases
5 releases since Debian 10 (Buster); the text changed 4 times.