[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: Wed, 11 Sep 2019 22:16:59 +0200

On 11.09.2019 18:22, Julian Foad wrote:
> [[[
> $ curl --head https://archive.apache.org/dist
> HTTP/1.1 301 Moved Permanently
> Location: https://archive.apache.org/dist/
> ...
>
> $ svn ls https://archive.apache.org/dist
> Redirecting to URL 'https://archive.apache.org/dist':
> Redirecting to URL 'https://archive.apache.org/dist':
> svn: E195019: Redirect cycle detected for URL
> 'https://archive.apache.org/dist'
> ]]]
>
> Subversion "canonicalized" the redirect URL in its own way, and in
> doing so removed the trailing slash, and then tried again and got the
> same response.
>
> I feel we should not really blame the server configuration. If the
> server was intended for use by svn clients only, we could say it
> should be changed to match what the Subversion client software
> expects, but that server is aimed just as much at web browser users,
> not that this trailing slash is important for them either. Anyhow,
> this kind of redirect seems perfectly reasonable and it seems wrong
> that Subversion does not work with it.
>
> I suppose Subversion should not canonicalize a URL received in a
> redirect, but should use it as given.
>
> Does that make sense?

It does not.

$ curl --request OPTIONS --include https://archive.apache.org/dist/
HTTP/1.1 200 OK
Date: Wed, 11 Sep 2019 20:11:40 GMT
Server: Apache/2.4.7 (Ubuntu)
Allow: GET,HEAD,POST,OPTIONS
Content-Length: 0
Content-Type: httpd/unix-directory

No DAV headers there, so it's not a Subversion repository and not our
problem. Compare to:

$ curl --request OPTIONS --include https://svn.apache.org/repos/asf
HTTP/1.1 200 OK
Date: Wed, 11 Sep 2019 20:14:12 GMT
Server: Apache/2.4.7 (Ubuntu)
DAV: 1,2
DAV: version-control,checkout,working-resource
DAV: merge,baseline,activity,version-controlled-collection
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
DAV: http://subversion.tigris.org/xmlns/dav/svn/atomic-revprops
DAV: http://subversion.tigris.org/xmlns/dav/svn/partial-replay
DAV: http://subversion.tigris.org/xmlns/dav/svn/inherited-props
DAV: http://subversion.tigris.org/xmlns/dav/svn/inline-props
DAV: http://subversion.tigris.org/xmlns/dav/svn/reverse-file-revs
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: <http://apache.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK,CHECKOUT
Content-Length: 0
Received on 2019-09-11 22:17:02 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.