GNURLOPT_DISALLOW_USERNAME_IN_URL(3)
π¦ CURLOPT_DISALLOW_USERNAME_IN_URL β gnurl manual, section 3 (GNURLOPT_D...NAME_IN_URL(3)) π¦
πΈ NAME πΈ
CURLOPT_DISALLOW_USERNAME_IN_URL β disallow specifying username in the url.
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle,
CURLOPT_DISALLOW_USERNAME_IN_URL, long disallow);
π DESCRIPTION π
okay so bestie, here's the tea: you pass a long parameter set to 1, and that tells the library to not allow URLs that include a username. That's literally the whole point of this icon. π«Ά
π DEFAULT π
0 (disabled) β user names are allowed by default. So if you don't touch it, usernames are welcome to the party. π
π PROTOCOLS π
Several β that's the whole answer on the page, bestie. β¨
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_DISALLOW_USERNAME_IN_URL, 1L);
curl_easy_perform(curl);
}
β AVAILABILITY β
Added in libcurl 7.61.0 β vintage but still serving looks. π
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_perform() will return CURLE_LOGIN_DENIED if this option is enabled and a URL containing a username is specified. So yeah, it will absolutely bounce you. π
π SEE ALSO π
The page's raw SEE ALSO line is literally libcurl-security(3), ,CURLOPT_PROTOCOLS(3) β double comma included, no cap. π
That's the whole page, bestie β brought to you by libcurl 7.61.0, dated 30 May 2018, and filed under GNURLOPT_D...NAME_IN_URL(3). ππ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, 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