diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-04-29 22:56:47 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-04-29 22:56:47 +0200 |
commit | d7b970e46ba29a7e558e21d19f485977ffed6266 (patch) | |
tree | ee22498bf5a000e5d398ff27e4ea74f5dc5194dd /lib/http.c | |
parent | 59d89286d433d8de5c68808189edb27bb65bac9e (diff) | |
download | curl-d7b970e46ba29a7e558e21d19f485977ffed6266.tar.gz |
http: move Curl_allow_auth_to_host()
It was mistakenly put within the CURL_DISABLE_HTTP_AUTH #ifdef
Reported-by: Michael Olbrich
Fixes #8772
Closes #8775
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/http.c b/lib/http.c index 0d5c449bc..b215307dc 100644 --- a/lib/http.c +++ b/lib/http.c @@ -651,6 +651,21 @@ CURLcode Curl_http_auth_act(struct Curl_easy *data) return result; } +/* + * Curl_allow_auth_to_host() tells if authentication, cookies or other + * "sensitive data" can (still) be sent to this host. + */ +bool Curl_allow_auth_to_host(struct Curl_easy *data) +{ + struct connectdata *conn = data->conn; + return (!data->state.this_is_a_follow || + data->set.allow_auth_to_other_hosts || + (data->state.first_host && + strcasecompare(data->state.first_host, conn->host.name) && + (data->state.first_remote_port == conn->remote_port) && + (data->state.first_remote_protocol == conn->handler->protocol))); +} + #ifndef CURL_DISABLE_HTTP_AUTH /* * Output the correct authentication header depending on the auth type @@ -775,21 +790,6 @@ output_auth_headers(struct Curl_easy *data, return CURLE_OK; } -/* - * Curl_allow_auth_to_host() tells if authentication, cookies or other - * "sensitive data" can (still) be sent to this host. - */ -bool Curl_allow_auth_to_host(struct Curl_easy *data) -{ - struct connectdata *conn = data->conn; - return (!data->state.this_is_a_follow || - data->set.allow_auth_to_other_hosts || - (data->state.first_host && - strcasecompare(data->state.first_host, conn->host.name) && - (data->state.first_remote_port == conn->remote_port) && - (data->state.first_remote_protocol == conn->handler->protocol))); -} - /** * Curl_http_output_auth() setups the authentication headers for the * host/proxy and the correct authentication |