httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Jacobfeuerborn <denni...@conversis.de>
Subject Re: [users@httpd] Filters not applied with ErrorDocument pages?
Date Mon, 06 Dec 2010 20:42:57 GMT
On 12/06/2010 08:40 PM, Igor Galić wrote:
>
> ----- "Dennis Jacobfeuerborn"<dennisml@conversis.de>  wrote:
>
>> I just noticed that when I use ErrorDocument to server custom 404
>> pages the
>> output filter I defined is not getting used anymore. Is there some
>> special
>> configuration required to make the filters also work on custom error
>> pages?
>
> I've noticed that myself. But I think it's actually quite good it doesn't.
> Most HTTP clients have a hard time dealing with HTTP as is.
> Confusing them with Transfer-Encoding and similar things, while confusing
> them with Errors -- that just might be too much.

If the filter mangles the output so that the client is unable to deal with 
the response that's arguably a problem with the filter. A custom 404 page 
is just that a standard html page with a 404 status code and I would expect 
that since I configured my filter for the vhost that all delivered pages 
are run through that filter. The fact that this isn't true for 
ErrorDocument should at least be documented. Perhaps a flag would be nice 
to be able to turn that behavior on and off on demand.

> Now, this is my experience (and speculation) using mod_filter+mod_deflate.
> What's your use-case? What's your config? And why do you think you need
> filters applied on Errors as well?

Because the error pages are supposed to look like all other pages. The 
filter trivially adds a header and footer to every page and the error pages 
are supposed to show these as well. One possibility would be to hard-code 
both directly into the error documents but that's just a hack and I would 
have to resort to a copy&paste every time the header needs to be changed.
A more flexible approach would have been to filter all pages and add the 
ability to not only match the filters according to headers but also to 
status codes. That way you could run ErrorDocuments through filters or you 
could just apply them to pages with a 200 status code.

> Finally, if someone of the Devs is spying, can you explain the reason
> behind this reasoning?

Maybe there is a way to get ErrorDocuments filtered too but it's not 
documented? Any help would be appreciated.

Regards,
   Dennis

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message