Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83A36DF32 for ; Thu, 6 Sep 2012 15:34:44 +0000 (UTC) Received: (qmail 52783 invoked by uid 500); 6 Sep 2012 15:34:43 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 52760 invoked by uid 500); 6 Sep 2012 15:34:43 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 52751 invoked by uid 99); 6 Sep 2012 15:34:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 15:34:43 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of markphip@gmail.com designates 209.85.215.43 as permitted sender) Received: from [209.85.215.43] (HELO mail-lpp01m010-f43.google.com) (209.85.215.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 15:34:36 +0000 Received: by lagm14 with SMTP id m14so2607537lag.16 for ; Thu, 06 Sep 2012 08:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CeVVBbw2GQLarbRO5/DoLHV7+JMT1wNeM575HhaMyGw=; b=zOR9dIj0A7Qb9UBE6Bwx+tAWYGDAX+3ZutEA4O4JYbVa7dBpNuHL6GrhmME/rjaUFP mUNAiYoeSrw/bbginIUOr+MVen+yjmkeQKRwF6UWQCbbkmrF/rW2+PtIYtfCZHG4q/n5 XyDMeme6vgYEqHSwAZH3+QMrCATjHKcK9hdYEh8zKTxOIA2wofZ9aae+LNiiUZNLp2e1 Q/TKCg2SFcuq1xPi6tCcSl0jcaQsfDyYxHs7eCV8xXuVQdvR80JJzKWg1ZYo9Mon2/PZ 0TsidLyos1/I8bDjzM3ssUAW2rAMYNdXqW+Lp3RWVYxOhiUrJUL6C2WylrdnGa2b7uyT brCg== MIME-Version: 1.0 Received: by 10.152.129.104 with SMTP id nv8mr2309762lab.32.1346945655655; Thu, 06 Sep 2012 08:34:15 -0700 (PDT) Received: by 10.112.20.161 with HTTP; Thu, 6 Sep 2012 08:34:15 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 Sep 2012 11:34:15 -0400 Message-ID: Subject: Re: better messaging w/ mod_dontdothat? From: Mark Phippard To: Doug Hunley Cc: users@subversion.apache.org Content-Type: multipart/alternative; boundary=f46d042d05b4564d9d04c90a39cc --f46d042d05b4564d9d04c90a39cc Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 6, 2012 at 11:26 AM, Doug Hunley wrote: > On Wed, Sep 5, 2012 at 4:46 PM, Mark Phippard 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. -- Thanks Mark Phippard http://markphip.blogspot.com/ --f46d042d05b4564d9d04c90a39cc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Sep 6, 2012 at 11:26 AM, Doug Hunley <doug.hunley@gmail.com> wrote:
On Wed, Sep 5, 2012 at 4:46 PM, Mark Phippard <markphip@gmail.com> wrote:
> Assume you already looked at the code? =A0The 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 ju= mped out at me. =A0The first is this comment:

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

It implies someone thought it might be pos= sible to pass back an error message the client could handle. =A0I do not kn= ow if they tried and failed or it is genuinely possible for someone to try.=

The other thing was just the return code itself:
<= div>
e =3D ap_bucket_error_c= reate(403, "No Soup For You!",
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0f->r->pool, f->c->b= ucket_alloc);

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

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

--
Thanks

Mark Phippard
http://markphip.blogspot.com/
--f46d042d05b4564d9d04c90a39cc--