Re: [PATCH 2/6] http: handle proxy proactive authentication
- From
Jeff King <peff@peff.net>
- Date
- May 4, 2012, 10:51 UTC
- Message-ID
- <20120504105106.GA24933@sigill.intra.peff.net>
- In-Reply-To
- <4FA3B92E.3000200@seap.minhap.es>
On Fri, May 04, 2012 at 01:10:38PM +0200, Nelson Benitez Leon wrote:
Show 8 quoted lines
> > When you parse the URL via credential_from_url, the components you get
> > will have any URL-encoding removed. So when you regenerate the URL in
> > the proxyhost variable, you would need to re-encode.
>
> Can a hostname has url-encoded parts? I thought that was only for the
> request uri (/somedir/somefile.php) or the query string ('?var1=val'),
> I'm only using the hostname here as a proxy server never has more than
> that, apart from the port number.Hmm. It can have URL-encoded parts (so we must decode when parsing), but the more important question is whether the decoded version can have parts that _need_ to be URL-encoded. And I think the answer is no, after double-checking the RFCs (i.e., hostnames cannot contain any of the URL reserved characters). So quoting would be a no-op, and we can skip it.
Anyway, your later patch ends up removing this chunk of code, so I think we can forget the issue entirely.
-Peff