git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] Rename proxy_authmethods -> authmethods

From
simon.richter@hogyros.de <simon.richter@hogyros.de>
Date
May 13, 2022, 07:04 UTC
Message-ID
<20220513070416.37235-2-Simon.Richter@hogyros.de>
In-Reply-To
<20220513070416.37235-1-Simon.Richter@hogyros.de>
From: Simon Richter <Simon.Richter@hogyros.de>

Curl also allows specifying a list of acceptable auth methods for the request itself, so this isn't specific to proxy authentication.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
---
 http.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/http.c b/http.c
index 229da4d148..318dc5daea 100644
--- a/http.c
+++ b/http.c
@@ -79,7 +79,7 @@ static int proxy_ssl_cert_password_required;
 static struct {
 	const char *name;
 	long curlauth_param;
-} proxy_authmethods[] = {
+} authmethods[] = {
 	{ "basic", CURLAUTH_BASIC },
 	{ "digest", CURLAUTH_DIGEST },
 	{ "negotiate", CURLAUTH_GSSNEGOTIATE },
@@ -470,14 +470,14 @@ static void init_curl_proxy_auth(CURL *result)
 
 	if (http_proxy_authmethod) {
 		int i;
-		for (i = 0; i < ARRAY_SIZE(proxy_authmethods); i++) {
-			if (!strcmp(http_proxy_authmethod, proxy_authmethods[i].name)) {
+		for (i = 0; i < ARRAY_SIZE(authmethods); i++) {
+			if (!strcmp(http_proxy_authmethod, authmethods[i].name)) {
 				curl_easy_setopt(result, CURLOPT_PROXYAUTH,
-						proxy_authmethods[i].curlauth_param);
+						authmethods[i].curlauth_param);
 				break;
 			}
 		}
-		if (i == ARRAY_SIZE(proxy_authmethods)) {
+		if (i == ARRAY_SIZE(authmethods)) {
 			warning("unsupported proxy authentication method %s: using anyauth",
 					http_proxy_authmethod);
 			curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
-- 
2.30.2
Previous: brian m. carlsonNext: Junio C Hamano
Message 4 of 7 in “Allow configuration of HTTP authentication method”
  1. 0/3 Allow configuration of HTTP authentication methodsimon.richter@hogyros.de, May 13, 2022
  2. 3/3 Allow empty user name in HTTP authenticationsimon.richter@hogyros.de, May 13, 2022
  3. brian m. carlsonMay 13, 2022
  4. 1/3 Rename proxy_authmethods -> authmethodssimon.richter@hogyros.de, May 13, 2022
  5. Junio C HamanoMay 13, 2022
  6. 2/3 Add config option/env var to limit HTTP auth methodssimon.richter@hogyros.de, May 13, 2022
  7. Junio C HamanoMay 13, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.