GNURLOPT_HTTP09_ALLOWED(3)
π GNURLOPT_HTTP09_ALLOWED(3) π
okay so bestie, this is the GNURLOPT_HTTP09_ALLOWED(3) page from the curl_easy_setopt options manual, and it's literally all about letting HTTP/0.9 responses through. tiny option, big main-character energy π
β¨
π NAME π
CURLOPT_HTTP09 β allow HTTP/0.9 response. periodt. π
π§ SYNOPSIS π§
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP09_ALLOWED, long
allowed);
πΈ DESCRIPTION πΈ
Pass the long argument allowed set to 1L to allow HTTP/0.9 responses. yes, 1L specifically, bestie β not vibes, not 1, not "sure whatever" β¨
A 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! not me side-eyeing every random TCP service ππ
π DEFAULT π
- curl allowed HTTP/0.9 responses by default before
7.66.0 - Since
7.66.0, libcurl requires this option set to1Lto allow HTTP/0.9 responses.
so yeah, the timeline matters here β before 7.66.0 it was chill by default, and since 7.66.0 you gotta opt in with 1L. π«Ά
π¦ PROTOCOLS π¦
HTTP β that's the whole protocol list, iconic. π₯
β EXAMPLE β
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_HTTP09_ALLOWED, 1L);
ret = curl_easy_perform(curl);
}
π AVAILABILITY π
Option added in 7.64.0, present along with HTTP. slay. π
π RETURN VALUE π
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. like, a clean little success/fail situation, no cap. β¨
π SEE ALSO π
and that's the page, bestie: libcurl 7.64.0, dated 17 Dec 2018, and the page name is GNURLOPT_HTTP09_ALLOWED(3) β bye, go allow those HTTP/0.9 responses responsibly π«Άπ
π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms