Control: tags 1074404 +confirmed Hallo,
yeah, right. And there are even more things fishy in combination with relative/absolute/protocol rewriting. I need to judge them all individually, later today. Current draft: https://salsa.debian.org/blade/apt-cacher-ng/-/merge_requests/new?merge_request%5Bsource_branch%5D=WIP Thanks, Eduard. * Tj [Fri, Jun 28 2024, 05:18:19AM]: > Package: apt-cacher-ng > Followup-For: Bug #1074404 > X-Debbugs-Cc: tj.iam...@proton.me > > As soon as I re-read the proposed patch I realised it is wrong in two > ways: > > 1. it would be triggered by // protocol specificier > 2. there is already a later stanza to deal with path-only > > However the existing path-only is pre-empted by the // protocol > detection. > > This revised patch moves the existing path detection before // protocol > but ensures the second character is not also '/'. > From dcedac77092b08c358cb9017767c70025f92aee4 Mon Sep 17 00:00:00 2001 > From: Tj <hac...@iam.tj> > Date: Wed, 26 Jun 2024 01:39:16 +0100 > Subject: [PATCH] Location: handle /path/ redirects > > Fixes 302 Location redirects on snapshot.debian.org. > > Signed-off-by: Tj <hac...@iam.tj> > --- > src/dlcon.cc | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/dlcon.cc b/src/dlcon.cc > index 935e41f..978118e 100644 > --- a/src/dlcon.cc > +++ b/src/dlcon.cc > @@ -209,6 +209,11 @@ struct tDlJob > > auto sLocationDecoded = UrlUnescape(pNewUrl); > > + if (startsWithSz(sLocationDecoded, "/") && sLocationDecoded[1] > != '/') > + { > + m_remoteUri.sPath = sLocationDecoded; > + return true; > + } > tHttpUrl newUri; > if (newUri.SetHttpUrl(sLocationDecoded, false)) > { > @@ -237,11 +242,6 @@ struct tDlJob > m_remoteUri.sPath += sPathBackup; > } > > - if (startsWithSz(sLocationDecoded, "/")) > - { > - m_remoteUri.sPath = sLocationDecoded; > - return true; > - } > // ok, must be relative > m_remoteUri.sPath += (sPathSepUnix + sLocationDecoded); > return true; > -- > 2.39.2 > -- <con-fuse> cite: man mutt; /hook - Pattern not found <cite> con-fuse: F1 hilft. <cite> In mutt selbst. <con-fuse> cite: die ist von meinem WM bereits vergeben. <cite> con-fuse: Du stellst Dich irgendwie an wie der erste Mensch beim Scheißen ;) /usr/share/doc/mutt/manual.txt.gz