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

Re: mod_dav_svn errors for POST and other requests

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 16 Apr 2013 14:23:55 +0100

"C. Michael Pilato" <cmpilato_at_collab.net> writes:

> On 04/16/2013 07:40 AM, Philip Martin wrote:
>> Perhaps mod_dav_svn should only return a low level error is a very few
>> carefully controlled circumstances and shoul usually return the more
>> generic "could not begin a transaction" generated inside mod_dav_svn.
> mod_dav_svn has the advantage of two different error output mechanisms, one
> for each of its "customers". Perhaps we could log (error_log) the more
> precise (machine-path-revealing) error, and transmit the generic error back
> to the user?

The dav_error's are chained a bit like svn_error_t's:

(gdb) p derr[0]
$1 = {status = 500, error_id = 13,
  desc = 0x7f73eb8fe1ab "could not begin a transaction", save_errno = 0,
  namespace = 0x0, tagname = 0x0, prev = 0x7f73e36f7290}
(gdb) p derr[0].prev[0]
$2 = {status = 500, error_id = 13,
  desc = 0x7f73e36f7228 "Can't create directory '/home/pm/sw/subversion/obj/repo/db/transactions/2-h.txn': Permission denied", save_errno = 0,
  namespace = 0x7f73eb9032f7 "svn:", tagname = 0x7f73eb9000e7 "error",
  prev = 0x0}

When mod_dav_svn adds a generic error it uses dav_svn_push_error so the
generic error doesn't have a tagname. If we were to manually chain a
new error created with dav_new_error_tag then we could give it a tagname
and it would be returned. This would change a lot of the errors
returned to the client and I don't know how useful the generic errors
would be. The low-level errors are a useful way for the backend to
communicate with the client.

Certified & Supported Apache Subversion Downloads:
Received on 2013-04-16 15:24:31 CEST

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