You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dirk-Willem van Gulik <di...@webweaving.org> on 2009/03/28 14:08:12 UTC
Untouchable header fields ?
Folks,
Am I right in looking at (trunk, 2.2):
file: http_filters.c
function basic_http_header
....
if (proxy)
....
else {
date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
ap_recent_rfc822_date(date, r->request_time);
form_header_field(&h, "Date", date);
form_header_field(&h, "Server", ap_get_server_banner());
}
to surmise that modules or other dl-loaded code - fundamentally cannot
overwride certain headers such as the Date/Server ? Or is my module just
plain buggy ?
Thanks,
Dw.
Re: Untouchable header fields ?
Posted by Colm MacCárthaigh <co...@allcosts.net>.
On Sat, Mar 28, 2009 at 2:27 PM, Paul Querna <pa...@querna.org> wrote:
> I believe there have been bug reports/requests to allow changing the
> Server header, but no one has complained about Date: before.
Heh, I made it modifiable, and provided a patch iirc , but noone else liked
it :-)
http://www.maths.tcd.ie/~dwmalone/p/login06.pdf
for details on the use-case (it's a fun read).
--
Colm
Re: Untouchable header fields ?
Posted by Paul Querna <pa...@querna.org>.
On Sat, Mar 28, 2009 at 2:08 PM, Dirk-Willem van Gulik
<di...@webweaving.org> wrote:
> Folks,
>
> Am I right in looking at (trunk, 2.2):
>
> file: http_filters.c
>
> function basic_http_header
> ....
> if (proxy)
> ....
> else {
> date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
> ap_recent_rfc822_date(date, r->request_time);
> form_header_field(&h, "Date", date);
> form_header_field(&h, "Server", ap_get_server_banner());
> }
>
> to surmise that modules or other dl-loaded code - fundamentally cannot
> overwride certain headers such as the Date/Server ? Or is my module just
> plain buggy ?
Correct, it is not currently possible to easily override these two
headers, without getting a little too creative with your filter stack
:)
I believe there have been bug reports/requests to allow changing the
Server header, but no one has complained about Date: before.