1CURLOPT_DISALLOW_USERNAME_INc_uUrRlL_(e3a)sy_setoptCoUpRtLiOoPnTs_DISALLOW_USERNAME_IN_URL(3)
2
3
4

NAME

6       CURLOPT_DISALLOW_USERNAME_IN_URL  - disallow specifying username in the
7       url
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       CURLcode    curl_easy_setopt(CURL    *handle,    CURLOPT_DISALLOW_USER‐
13       NAME_IN_URL, long disallow);
14

DESCRIPTION

16       A  long  parameter  set  to  1 tells the library to not allow URLs that
17       include a username.
18

DEFAULT

20       0 (disabled) - user names are allowed by default.
21

PROTOCOLS

23       Several
24

EXAMPLE

26       CURL *curl = curl_easy_init();
27       if(curl) {
28
29         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
30         curl_easy_setopt(curl, CURLOPT_DISALLOW_USERNAME_IN_URL, 1L);
31
32         curl_easy_perform(curl);
33       }
34

AVAILABILITY

36       Added in libcurl 7.61.0
37

RETURN VALUE

39       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
40       if not.
41
42       curl_easy_perform()  will  return  CURLE_LOGIN_DENIED if this option is
43       enabled and a URL containing a username is specified.
44

SEE ALSO

46       libcurl-security(3), ,CURLOPT_PROTOCOLS(3)
47
48
49
50libcurl 7.61.1                 February 25,C2U0R1L8OPT_DISALLOW_USERNAME_IN_URL(3)
Impressum