git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: "Schmidt, Marco" <Marco.Schmidt@cassidian.com>
Cc: <git@vger.kernel.org>, <gitster@pobox.com>, <avarab@gmail.com>
Subject: Re: Patchset NTLM-Authentication
Date: Tue, 21 Feb 2012 14:28:17 +0100	[thread overview]
Message-ID: <8762f05n9q.fsf_-_@thomas.inf.ethz.ch> (raw)
In-Reply-To: <4CDEC141B5583D408E79F2931DB7708301802BE7@GSX300A.mxchg.m.corp> (Marco Schmidt's message of "Tue, 21 Feb 2012 12:42:26 +0100")

"Schmidt, Marco" <Marco.Schmidt@cassidian.com> writes:

> Thanks for your reply. I have used the wereHamster bundler service and
> created the following patch. May I ask you to test the patch and check
> again for more style violations?

Please keep these discussions public, so that others can learn and
(heaven forbid...) point out _my_ mistakes.

I'll discuss the file you attached below.  Keep in mind that unless
there is a compelling reason not to do that, you should send your
patches inline.  This allows for much easier review on the list.

> Subject: [PATCH] Allow NTLM-Authentication against a http-proxy server - Add
>  config option "http.proxyauthany" - Set CURLOPT_PROXYAUTH
>  to CURLAUTH_ANY if option curl_http_proxyauthany is true.
> 
> ---

You can already see that you did not adhere to the standard format of a
commit message: one line summary, followed by a blank line, followed by
a long description.  So the above might have been written (dropping the
Subject: pseudoheader tag now):

} Allow NTLM-Authentication against a http-proxy server
} 
} - Add config option "http.proxyauthany"
} 
} - Set CURLOPT_PROXYAUTH to CURLAUTH_ANY if option
}   curl_http_proxyauthany is true.

Now bear in mind that I have no clue about curl (except that it
downloads stuff ;-) and especially about its authentication parts.  But
allow me to sketch a different commit message that highlights what I
would like to see answered.  I am merely using the knowledge I could
glean from 2min of googling around; I am not saying that anything of it
is correct, so you should fix it as needed!

  http/curl: let user configure "any" proxy authentication

  Normally, curl uses only the "basic" authentication scheme when
  talking to proxies, which may not be desirable (it sends the password
  in cleartext) or sufficient (the author needs NTLM authentication for
  his proxy).

  Introduce the config setting http.proxyAuthAny.  When enabled, we tell
  curl to use any authentication scheme supported by the proxy.

  This mostly parallels http.authAny which was introduced in b8ac923
  (Add an option for using any HTTP authentication scheme, not only
  basic, 2009-11-27).  http.authAny was removed, and its feature
  unconditionally enabled, in 525ecd2 (Remove http.authAny, 2009-12-28).
  However the reasoning of the latter does not apply here because XXXX.


Some notes on the code/patch: There was some trailing whitespace, please
make sure you remove it.

Usually we introduce a setting (command line option or environment
variable) that can be tweaked to override the configuration.  b8ac923
did this if you need some inspiration :-)  Otherwise you should make an
argument why this is not needed.

 +#ifdef LIBCURL_CAN_HANDLE_AUTH_ANY
> +	if (curl_http_proxyauthany) {
> +		curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
> +	}
> +#endif

My google is failing me as to when this feature was introduced or how
common curls without it still are.  But you could be extra doubly nice
to the user and warn if s/he enabled the feature, but git cannot adhere
to the request because curl doesn't support it.  (Then again b8ac923
didn't go that far either.)

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  parent reply	other threads:[~2012-02-21 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21  8:07 Patchset NTLM-Authentication Schmidt, Marco
2012-02-21  9:22 ` Thomas Rast
     [not found]   ` <4CDEC141B5583D408E79F2931DB7708301802BE7@GSX300A.mxchg.m.corp>
2012-02-21 13:28     ` Thomas Rast [this message]
2012-02-21 18:02       ` Junio C Hamano
2012-02-21 19:02         ` Daniel Stenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762f05n9q.fsf_-_@thomas.inf.ethz.ch \
    --to=trast@inf.ethz.ch \
    --cc=Marco.Schmidt@cassidian.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).