You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/10/24 00:09:35 UTC
svn commit: r1187986 - in /httpd/httpd/trunk/docs/manual: custom-error.xml
mod/core.xml
Author: sf
Date: Sun Oct 23 22:09:34 2011
New Revision: 1187986
URL: http://svn.apache.org/viewvc?rev=1187986&view=rev
Log:
Clarify how ErrorDocument interprets argument
PR: 42430
Modified:
httpd/httpd/trunk/docs/manual/custom-error.xml
httpd/httpd/trunk/docs/manual/mod/core.xml
Modified: httpd/httpd/trunk/docs/manual/custom-error.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/custom-error.xml?rev=1187986&r1=1187985&r2=1187986&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/custom-error.xml (original)
+++ httpd/httpd/trunk/docs/manual/custom-error.xml Sun Oct 23 22:09:34 2011
@@ -69,12 +69,13 @@
ErrorDocument <3-digit-code> <action>
</example>
- <p>where the action can be one of:</p>
+ <p>where the action will be treated as:</p>
<ol>
- <li>Text to be displayed. Wrap the text with quotes (").</li>
- <li>A local URL to redirect to.</li>
- <li>An external URL to redirect to.</li>
+ <li>A local URL to redirect to (if the action begins with a "/").</li>
+ <li>An external URL to redirect to (if the action is a valid URL).</li>
+ <li>Text to be displayed (if none of the above). The text must be
+ wrapped in quotes (") if it consists of more than one word.</li>
</ol>
<p>When redirecting to a local URL, additional environment variables
Modified: httpd/httpd/trunk/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml?rev=1187986&r1=1187985&r2=1187986&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Oct 23 22:09:34 2011
@@ -1165,6 +1165,7 @@ in case of an error</description>
ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
ErrorDocument 401 /subscription_info.html<br />
ErrorDocument 403 "Sorry can't allow you access today"
+ ErrorDocument 403 Forbidden!
</example>
<p>Additionally, the special value <code>default</code> can be used
Re: svn commit: r1187986 - in /httpd/httpd/trunk/docs/manual: custom-error.xml mod/core.xml
Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Monday 24 October 2011, William A. Rowe Jr. wrote:
> On 10/24/2011 6:25 AM, Stefan Fritsch wrote:
> > On Monday 24 October 2011, Roy T. Fielding wrote:
> >> On Oct 23, 2011, at 3:09 PM, sf@apache.org wrote:
> >>> --- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
> >>> +++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Oct 23
> >>> 22:09:34 2011 @@ -1165,6 +1165,7 @@ in case of an
> >>> error</description>
> >>>
> >>> ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
> >>> ErrorDocument 401 /subscription_info.html<br />
> >>> ErrorDocument 403 "Sorry can't allow you access today"
> >>>
> >>> + ErrorDocument 403 Forbidden!
> >>>
> >>> </example>
> >>>
> >>> <p>Additionally, the special value <code>default</code> can
> >>> be used
> >>
> >> I don't think that change was intended, right? Looks like an
> >> error test.
> >
> > No, this example is intendended to demonstrate that the double
> > quotes are not significant. But a line break was missing.
>
> Actually that shouldn't be supported. If it was an undocumented
> feature it aught to stay undocumented. How do we know this isn't
> a typo of URI /Forbidden! ?
We don't. We just look at the leading slash. I have merely documented
what is the current behaviour since 2.0.
> Trip on the way-back machine to early 1.3, the leading quote was
> required (and trailing quote wasn't allowed, weird). I had
> intended that they would have leading and trailing quotes when I
> patched that oddity.
The quotes are eaten by ap_getword_conf in AP_INIT_TAKE2. One would
have to use AP_INIT_RAW_ARGS to see them. But IMO the current behavior
is ok, no need to change it.
Re: svn commit: r1187986 - in /httpd/httpd/trunk/docs/manual: custom-error.xml
mod/core.xml
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 10/24/2011 6:25 AM, Stefan Fritsch wrote:
> On Monday 24 October 2011, Roy T. Fielding wrote:
>> On Oct 23, 2011, at 3:09 PM, sf@apache.org wrote:
>>> --- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
>>> +++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Oct 23
>>> 22:09:34 2011 @@ -1165,6 +1165,7 @@ in case of an
>>> error</description>
>>>
>>> ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
>>> ErrorDocument 401 /subscription_info.html<br />
>>> ErrorDocument 403 "Sorry can't allow you access today"
>>>
>>> + ErrorDocument 403 Forbidden!
>>>
>>> </example>
>>>
>>> <p>Additionally, the special value <code>default</code> can be
>>> used
>>
>> I don't think that change was intended, right? Looks like an error
>> test.
>
> No, this example is intendended to demonstrate that the double quotes
> are not significant. But a line break was missing.
Actually that shouldn't be supported. If it was an undocumented feature
it aught to stay undocumented. How do we know this isn't a typo of
URI /Forbidden! ?
Trip on the way-back machine to early 1.3, the leading quote was required
(and trailing quote wasn't allowed, weird). I had intended that they
would have leading and trailing quotes when I patched that oddity.
Re: svn commit: r1187986 - in /httpd/httpd/trunk/docs/manual: custom-error.xml mod/core.xml
Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Monday 24 October 2011, Roy T. Fielding wrote:
> On Oct 23, 2011, at 3:09 PM, sf@apache.org wrote:
> > --- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
> > +++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Oct 23
> > 22:09:34 2011 @@ -1165,6 +1165,7 @@ in case of an
> > error</description>
> >
> > ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
> > ErrorDocument 401 /subscription_info.html<br />
> > ErrorDocument 403 "Sorry can't allow you access today"
> >
> > + ErrorDocument 403 Forbidden!
> >
> > </example>
> >
> > <p>Additionally, the special value <code>default</code> can be
> > used
>
> I don't think that change was intended, right? Looks like an error
> test.
No, this example is intendended to demonstrate that the double quotes
are not significant. But a line break was missing.
Re: svn commit: r1187986 - in /httpd/httpd/trunk/docs/manual: custom-error.xml mod/core.xml
Posted by "Roy T. Fielding" <fi...@gbiv.com>.
On Oct 23, 2011, at 3:09 PM, sf@apache.org wrote:
> --- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
> +++ httpd/httpd/trunk/docs/manual/mod/core.xml Sun Oct 23 22:09:34 2011
> @@ -1165,6 +1165,7 @@ in case of an error</description>
> ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
> ErrorDocument 401 /subscription_info.html<br />
> ErrorDocument 403 "Sorry can't allow you access today"
> + ErrorDocument 403 Forbidden!
> </example>
>
> <p>Additionally, the special value <code>default</code> can be used
I don't think that change was intended, right? Looks like an error test.
....Roy