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

Re: http.c (curl_easy_setopt and CURLAUTH_ANY)

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 29, 2015, 00:33 UTC
Message-ID
<20150829003318.GA469190@vauxhall.crustytoothpaste.net>
In-Reply-To
<CAF0pADEsO0y_6wcx-xNwRqjauJmMcQ8mUmbUbbWCBrK2gQ1quA@mail.gmail.com>
On Fri, Aug 28, 2015 at 04:07:36PM +1000, Stephen Kazakoff wrote:
Show 16 quoted lines
> Hi,
> 
> When I'm behind a proxy (with BASIC authentication), I'm unable to
> perform a git clone.
> 
> I managed to fix this by editing http.c and recompiling. The change
> I'd like to propose is to line 452.
> 
> 
> From:
> 
> curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
> 
> To:
> 
> curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_BASIC | CURLAUTH_NTLM);

Assuming it's supported upstream, I suspect this would break people who are using GSSAPI (or Digest) authentication for their proxy. This would be a logical thing to do where Kerberos is used.

It might be worth checking exactly which bits cause problems for you; perhaps your proxy might be misconfigured to suggest a type that it doesn't support.

Show 7 quoted lines
> I did however find the CURL documentation
> (https://secure.php.net/manual/en/function.curl-setopt.php) slightly
> conflicting. On one hand, "CURLAUTH_ANY" is effectively the same as
> passing "CURLAUTH_BASIC | CURLAUTH_NTLM". But the documentation for
> "CURLOPT_PROXYAUTH" says that only "CURLAUTH_BASIC" and
> "CURLAUTH_NTLM" are currently supported. By that, I'm assuming
> "CURLAUTH_ANY" is not supported.

This looks like the documentation for PHP. The libcurl documentation[0] doesn't mention a limitation.

[0] http://curl.haxx.se/libcurl/c/CURLOPT_PROXYAUTH.html
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Johannes Schindelin
Message 4 of 4 in “http.c (curl_easy_setopt and CURLAUTH_ANY)”
  1. Stephen KazakoffAug 28, 2015
  2. Daniel StenbergAug 28, 2015
  3. Johannes SchindelinAug 28, 2015
  4. brian m. carlsonAug 29, 2015

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.