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

Re: better messaging w/ mod_dontdothat?

From: Mark Phippard <markphip_at_gmail.com>
Date: Thu, 6 Sep 2012 11:34:15 -0400

On Thu, Sep 6, 2012 at 11:26 AM, Doug Hunley <doug.hunley_at_gmail.com> wrote:

> On Wed, Sep 5, 2012 at 4:46 PM, Mark Phippard <markphip_at_gmail.com> wrote:
> > Assume you already looked at the code? The comments are interesting and
> > might point in a direction to go:
> I did, but as I read it that only makes reference to populating the
> Apache logs. Where there does it show that I can set the Apache status
> code (or similar) so I can use my own custom error messaging?
> Apologies if it should be obvious, I'm not a coder
> Me neither.

But there were two things that jumped out at me. The first is this comment:

* TODO: Try and pass back a custom document body containing a
* serialized svn_error_t so the client displays a better
* error message. */

It implies someone thought it might be possible to pass back an error
message the client could handle. I do not know if they tried and failed or
it is genuinely possible for someone to try.

The other thing was just the return code itself:

e = ap_bucket_error_create(403, "No Soup For You!",
                                     f->r->pool, f->c->bucket_alloc);

It seems that it would be easy to return a different HTTP error code if you
were just looking for a different error code. That said, it seems like 403
is the appropriate error code.

A 403 means that client authentication was successful. There is no reason
to think that credentials were wrong. 403 means they are not allowed to do
what they tried to do and should not try again.

Mark Phippard
Received on 2012-09-06 17:34:50 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.