[prev in list] [next in list] [prev in thread] [next in thread]
List: cygwin-apps
Subject: Re: Double-slashes in URLs
From: Corinna Vinschen <corinna-cygwin () cygwin ! com>
Date: 2015-10-19 15:43:57
Message-ID: 20151019154357.GD18989 () calimero ! vinschen ! de
[Download RAW message or body]
On Sep 22 14:39, Jon TURNEY wrote:
> On 17/09/2015 16:18, Michael Bisbjerg wrote:
> >I noticed once I set up a mirror of my own, that Cygwin Setup will
> >prepend all it's URL's with a double-slash. This does not seem to be
> >intentional, and I found the place in the sources where I believe the
> >error to be.
> >
> >On line 160 of "download.cc", we see that the "n->key" is the source
> >of the repository, including a "/", as it is used as the name of the
> >local cache, which always has a "%2f" in its name. That key is then
> >used on line 165 in "get_url_to_file", where it is concatenated with
> >another slash and "pkgsource.Canonical" to make the final URL.
>
> This analysis seems correct. It would be nice if you went a bit further and
> confirmed that the URL is always canonicalized to end with a '/'.
>
> >My (untested) patch removes this slash, so that the resulting URL's
> >will be with a single slash.
>
> Thanks.
>
> This looks correct, and appears to work.
Thanks for your patch, Michael!
Jon, did you apply this patch? If not, feel free to do so.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic