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

Re: ra_serf redirect URL canonicalization fix

From: Branko Čibej <brane_at_apache.org>
Date: Sat, 1 Feb 2020 12:31:16 +0100

On 01.02.2020 12:17, Stefan Sperling wrote:
> On Fri, Jan 31, 2020 at 04:12:20AM +0000, Daniel Shahaf wrote:
>> So in balance, how about —
>> - ra_serf should not canonicalize redirection URLs before accessing them.
>> - After following all redirections (that is, once we get a 2xx response
>> or a 5xx response), canonicalize the resultant URL. If it is then
>> equal to the input URL, error out with a "Not a repository" error
>> [SVN_ERR_RA_SVN_REPOS_NOT_FOUND seems appropriate]; otherwise, return
>> SVN_ERR_RA_SESSION_URL_MISMATCH (the error code that svn_ra_open4()
>> promises for this situation).
>> This would fix both of the original bugs, wouldn't it?
> This idea won't work without some restructuring because the redirect
> retry loop is currently in libsvn_client, not within ra_serf.

And for good reason. The RA layer is supposed do be stupid^Wsimple.

-- Brane
Received on 2020-02-01 12:31:18 CET

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.