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

Re: [PATCH] Issue #660: Add basic support for redirects to ra_dav

From: Daniel Westermann-Clark <dwc_at_tigris.org>
Date: 2006-08-19 06:05:45 CEST

Apologies for the slow response. I've attempted to take your
suggestions into account, but the changes are a bit more significant
this time around. :)

On 2006-08-01 10:07:46 -0700, Daniel Rall wrote:
> commit.c has the interrogate_for_location() routine for doing this
> work. Would it be possible to refactor both variations of
> "Location" header retreival logic into there, and maintain an API
> which is compliant with Neon 0.25?

I've done a bit of refactoring to svn_ra_dav__request_interrogator
in order to make it backwards compatible.

The function interrogate_for_location from commit.c has been moved to

The two request interrogator arguments to svn_ra_dav__request_dispatch
are now part of the function's prototype regardless of Neon version.
This required making the function interrogate_for_content_type in
fetch.c backwards compatible also.

> While we don't use ne_free() in other places we access the
> "Location" header, since we get the data from Neon I think we
> should. (It's simply #define'd to free() on my Linux box.)

I was unsure about this; I've changed it to ne_free in the latest
version of the patch.

Patch by: Daniel Westermann-Clark <dwc@tigris.org>
Suggested by: Mark Benedetto King <mbk@tigris.org>
              Greg Stein <gstein@tigris.org>
Reviewed by:

Fix issue #660: Notify ra_dav user of repository redirection.

* subversion/include/svn_error_codes.h
  Add SVN_ERRDEF for moved/relocated repositories named

* subversion/libsvn_ra_dav/ra_dav.h
  (interrogate_for_location): Add prototype.
  (svn_ra_dav__request_dispatch): Update prototype to accept
   interrogator regardless of Neon version.
* subversion/libsvn_ra_dav/commit.c
  (interrogate_for_location): Move to util.c.

* subversion/libsvn_ra_dav/fetch.c
  (interrogate_for_content_type): Make compatible with Neon < 0.25
   using ne_add_response_header_handler.
  (custom_get_request): Always pass interrogate_for_content_type when
   dispatching the request.

* subversion/libsvn_ra_dav/util.c
  (interrogate_for_location): Move from commit.c and make compatible
   with Neon < 0.25.
  (parsed_request): For response status codes 301 and 302, provide an
   error message with the new location of the repository based on the
   Location response header.
  (svn_ra_dav__request_dispatch): Update prototype to accept
   interrogator regardless of Neon version.

Daniel Westermann-Clark

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Aug 19 06:06:16 2006

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.