[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Redirect cycle detected for URL, if redirect adds a trailing slash

From: Branko Čibej <brane_at_apache.org>
Date: Fri, 13 Sep 2019 14:18:11 +0200

On 13.09.2019 13:36, Julian Foad wrote:
> Branko Čibej wrote:
>>> It is a confusing error message, though. The redirect "cycle" is only
>>> Subversion that made it a cycle, and is not the real problem. We could
>>> do better.
>>
>> We could. Not canonicalizing the value of the Location header is an
>> option; if it's not a valid URL, that's the server admin's problem, not
>> ours (and as noted a number of times in other conversations, Subversion
>> is not a browser so we don't have to worry about producing user-friendly
>> URLs).
>
> The attached patch, 'serf-no-canonicalize-redirect-1.patch', stops
> canonicalizing the redirect, solving this problem.
>
> I have only tested that it fixes the non-repository case I reported,
> and verified that the existing test suite still passes. I haven't
> tested what difference it makes to any currently untested forms of
> redirect when accessing a repo.
>
> WDYT?

It looks correct to me, and the result you report against
archive.apache.org is correct, too. I'd say, go ahead and commit it,
we'll soon see if something goes wrong because of that.

The only thing I can think of is that we *require* that repository paths
of directories don't have a trailing slash, for example. However,
mod_dav_svn doesn't do 'foo/' -> 'foo' redirects, so this shouldn't be
an issue, IMO.

> ps. It's my favourite kind of patch: a code reduction/simplification.

Eventually (at t < ∞)we'll reach the point where there's no code at all
in subversion/ :)

-- Brane
Received on 2019-09-13 14:18:13 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.