You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 1998/11/10 09:54:00 UTC
error behavior change from 1.3.2 to 1.3.3
In Apache 1.3.2, my module could use ap_log_rerror() to drop an error
into the "error-notes" field. I would then return HTTP_CREATED and the
error that I registered would be placed into the body of the response
(in the ap_send_error_response() function).
In 1.3.3, "error-notes" is ignored except for some particular cases.
This results in a behavioral change for my module: the response body now
gives the "internal error or misconfiguration" text.
Examining the code, it would appear that I cannot simply return
HTTP_CREATED any more, but that I must handle all response activity and
return DONE instead. A similar situation would hold for other status
codes that ap_send_error_response() does not recognize.
Is this the case? Must I go through with ap_send_http_header(), writing
of the body, etc?
Or have I overlooked a way to return a status+message "correctly"?
thx
-g
p.s. should I try questions like this on the apache-modules list first?
that list seems rather dead...
--
Greg Stein, http://www.lyra.org/
Re: error behavior change from 1.3.2 to 1.3.3
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Greg Stein wrote:
>
> In Apache 1.3.2, my module could use ap_log_rerror() to drop an error
> into the "error-notes" field. I would then return HTTP_CREATED and the
> error that I registered would be placed into the body of the response
> (in the ap_send_error_response() function).
Unfortunately, there were numerous complaints about the fact
that this behaviour revealed things like the URI-to-filesystem
mapping scheme, primarily on 500 status pages. And the
error-notes text was frequently inappropriate for other displays.
> Examining the code, it would appear that I cannot simply return
> HTTP_CREATED any more, but that I must handle all response activity
> and return DONE instead. A similar situation would hold for other
> status codes that ap_send_error_response() does not recognize.
>
> Is this the case? Must I go through with ap_send_http_header(), writing
> of the body, etc?
You should be able to call ap_custom_response() to do internally
what ErrorDocument does from the config directive level.
See http_core.c.
> Or have I overlooked a way to return a status+message "correctly"?
It would be nice if ap_custom_response() allowed for the
setting of a callback routine as an alternative to the
current ErrorDocument-style settings. But not yet.. you
need to work within the current ErrorDocument-style constraints.
> p.s. should I try questions like this on the apache-modules list first?
> that list seems rather dead...
Well, it's dead as long as people don't ask questions
there.. :-)
#ken P-)}
Ken Coar <http://Web.Golux.Com/coar/>
Apache Group member <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>