subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko Čibej <>
Subject Re: Redirect cycle detected for URL, if redirect adds a trailing slash
Date Fri, 13 Sep 2019 12:18:11 GMT
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.

It looks correct to me, and the result you report against 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

View raw message