All of lore.kernel.org
 help / color / mirror / Atom feed
From: Knut Franke <k.franke@science-computing.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH 2/2] http: use credential API to handle proxy authentication
Date: Tue, 3 Nov 2015 10:31:04 +0100	[thread overview]
Message-ID: <20151103093103.GB6354@science-computing.de> (raw)
In-Reply-To: <xmqqbnbcdnb8.fsf@gitster.mtv.corp.google.com>

On 2015-11-02 14:54, Junio C Hamano wrote:
> >  static void init_curl_proxy_auth(CURL *result)
> >  {
> > +	if (proxy_auth.username) {
> > +		if (!proxy_auth.password)
> > +			credential_fill(&proxy_auth);
> > +#if LIBCURL_VERSION_NUM >= 0x071301
> > +		curl_easy_setopt(result, CURLOPT_PROXYUSERNAME,
> > +			proxy_auth.username);
> > +		curl_easy_setopt(result, CURLOPT_PROXYPASSWORD,
> > +			proxy_auth.password);
> > +#else
> > +		struct strbuf s = STRBUF_INIT;
> > +		strbuf_addstr_urlencode(&s, proxy_auth.username, 1);
> > +		strbuf_addch(&s, ':');
> > +		strbuf_addstr_urlencode(&s, proxy_auth.password, 1);
> > +		curl_proxyuserpwd = strbuf_detach(&s, NULL);
> > +		curl_easy_setopt(result, CURLOPT_PROXYUSERPWD, curl_proxyuserpwd);
> > +#endif
> 
> I think #else clause of this thing would introduce decl-after-stmt
> compilation error.

I've actually tested this with CURL 7.15.5 (0x070f05), and didn't get any
compilation error.


Cheers,
Knut
-- 
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Arno Steitz
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

  reply	other threads:[~2015-11-03  9:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 17:55 [PATCH 1/2] http: allow selection of proxy authentication method Knut Franke
2015-10-26 17:55 ` [PATCH 2/2] http: use credential API to handle proxy authentication Knut Franke
2015-10-26 20:33 ` [PATCH 1/2] http: allow selection of proxy authentication method Junio C Hamano
2015-10-27  8:47   ` Knut Franke
2015-10-28  9:40 ` [PATCH v2] http proxy authentication improvements Knut Franke
2015-10-28  9:40   ` [PATCH 1/2] http: allow selection of proxy authentication method Knut Franke
2015-10-28 16:51     ` Junio C Hamano
2015-10-28 16:59       ` Junio C Hamano
2015-10-30 18:01       ` Knut Franke
2015-10-30 19:19         ` Junio C Hamano
2015-10-28 18:54     ` Eric Sunshine
2015-10-28  9:40   ` [PATCH 2/2] http: use credential API to handle proxy authentication Knut Franke
2015-10-28 18:58     ` Eric Sunshine
2015-10-30 18:24       ` Knut Franke
2015-10-30 19:31         ` Junio C Hamano
2015-10-30 19:35           ` Eric Sunshine
2015-11-02 16:54 ` [PATCH v3 0/2] Knut Franke
2015-11-02 16:54   ` [PATCH 1/2] http: allow selection of proxy authentication method Knut Franke
2015-11-02 22:46     ` Junio C Hamano
2015-11-03  9:07       ` Knut Franke
2015-11-03 19:46         ` Junio C Hamano
2015-11-02 16:54   ` [PATCH 2/2] http: use credential API to handle proxy authentication Knut Franke
2015-11-02 22:54     ` Junio C Hamano
2015-11-03  9:31       ` Knut Franke [this message]
2015-11-03 18:12         ` Eric Sunshine
2015-11-04  9:13 ` [PATCH v4 0/2] Knut Franke
2015-11-04  9:13   ` [PATCH 1/2] http: allow selection of proxy authentication method Knut Franke
2015-11-04 19:42     ` Junio C Hamano
2015-11-04  9:13   ` [PATCH 2/2] http: use credential API to handle proxy authentication Knut Franke
2015-11-04 19:41     ` Eric Sunshine
2015-11-04 19:53     ` Junio C Hamano
2015-11-05  8:24     ` Jeff King
2015-11-05 11:56       ` Knut Franke
2015-11-05 17:30         ` Jeff King

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=20151103093103.GB6354@science-computing.de \
    --to=k.franke@science-computing.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.