meaningful error messages in http

2010-12-07 Thread Nick Stokes
Hi all,

I am serving our repositories over https, using Apache 2.2, via mod_dav_svn,
also using mod_authz_svn for per directory access control.  Most users find
the error messages cryptic (when there is a permission related error on
checkout, commit, so on...)  and I am wondering if there is a way to
customize these messages?

For example, current (default?) set up spits out the following:

*If checkout fails due to insufficient permissions:*
svn: Server sent unexpected return value (403 Forbidden) in response to
OPTIONS request for 'https://my.cool.server/foo/trunk'

*If checkout fails due to spelling error in repository* *name:*
svn: Server sent unexpected return value (403 Forbidden) in response to
OPTIONS request for 'https://my.cool.server/f00/trunk'

*If commit fails due to insufficient permissions:*
svn: Commit failed (details follow):
svn: Server sent unexpected return value (403 Forbidden) in response to
MKACTIVITY request for
'/svn/site-macros/!svn/act/d5936c16-fd56-4f62-a9f1-b1285bea6c7'

Thanks for any leads,
Nick


Re: meaningful error messages in http

2010-12-07 Thread Nick Stokes
On Tue, Dec 7, 2010 at 1:11 PM, Andy Levy  wrote:

> On Tue, Dec 7, 2010 at 11:59, Nick Stokes
>  wrote:
> > Hi all,
> >
> > I am serving our repositories over https, using Apache 2.2, via
> mod_dav_svn,
> > also using mod_authz_svn for per directory access control.  Most users
> find
> > the error messages cryptic (when there is a permission related error on
> > checkout, commit, so on...)  and I am wondering if there is a way to
> > customize these messages?
> >
> > For example, current (default?) set up spits out the following:
> >
> > If checkout fails due to insufficient permissions:
> > svn: Server sent unexpected return value (403 Forbidden) in response to
> > OPTIONS request for 'https://my.cool.server/foo/trunk'
> >
> > If checkout fails due to spelling error in repository name:
> > svn: Server sent unexpected return value (403 Forbidden) in response to
> > OPTIONS request for 'https://my.cool.server/f00/trunk'
>
> I don't think Subversion can tell the difference here. If my AuthZ
> file specifies that I have access to /f00/trunk/ and I ask for
> /foo/trunk/, all that's really known is that I asked for a path which
> I do not have permission to access. Do you propose that the server
> scan for all possible "similar" repositories/paths in an attempt to
> find a match?
>
>
No. I did not propose that.  The question was simple: Is there way to
customize error messages from httpd server (akin to customizing logs in
apache as in http://tinyurl.com/svn-apache-logs)?  When users see "Server
sent unexpected return value..." they assume there is something wrong with
the server itself, despite the keyword "Forbidden" that follows. Besides,
there is the redundant/misleading/irrelevant-for-client stuff there
(OPTIONS, MKACTIVITY, respos ID).  e.g. svnserve error messages are much
better.


Re: meaningful error messages in http

2010-12-08 Thread Nick Stokes
On Wed, Dec 8, 2010 at 5:13 AM, Johan Corveleyn  wrote:

[snip]


> Most users don't know (or don't care) about HTTP error codes. And I
> bet 99.9% of svn users don't know what an OPTIONS request is  (and
> they certainly don't care).
>
> Cheers,
>


Couldn't have said it better... On your earlier comment:

Moreover, one would expect these kinds of error message to be exactly
> the same regardless of the underlying protocol or server type (unless
> it's some kind of protocol-specific error, like e.g. SSL handshake
> failure or something (which should also be made into user-sensible
> error messages, but might not be generic over all protocols)).
>

Completely agree. Just wondering, is there a technical reason why subversion
wasn't already that way?


>
> I don't know if there is already an issue for this in the issue
> tracker, but regardless ... maybe we could have a useful discussion on
> this mailing list about what the error messages should say
> specifically?
>

What you proposed are fine, and I guess the more consistent with svnserve
the better. What would be curious to find if there is any one out there for
who these messages are essential. (your guess number 0.1% may be optimistic
:)

Nick