GNURLOPT_DISALLOW_USERNAME_IN_URL(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ¦‹ 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