You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Mi...@telekurs.de on 2003/07/17 18:58:40 UTC
Some notes about http://httpd.apache.org/docs-2.0/mod/mod_headers
.html
http://httpd.apache.org/docs-2.0/mod/mod_headers.html#order
tells me:
"They are valid in the main server config and virtual host sections,
inside
<Directory>, <Location> and <Files> sections, and within .htaccess files."
Besides these containers, Apache 2.0 now supports the new <Proxy> container
(http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxy).
So what about using mod_headers to "edit" HTTP headers of content that is
just
being embedded via ProxyPass? At which position inside the evaluation
sequence
would <Proxy> appear in this case?
I successfully added headers inside a <Proxy> section, so this might be
added to
the documentation section.
I also successfully removed _certain_ other headers, including the
"Server:"
header (thus masquerading the HTTP response as coming from my own server,
when used in combination with "ProxyVia Block").
When I tried to remove certain other headers as well, this didn't work at
first.
I traced the HTTP traffic of my Apache and saw the (proprietary) header
"Fd-Billing-Info: 0" but couldn't remove this one with "Header unset".
Then I traced the origin server - and to my surprise I found out that this
machine
actually sent headers like "Fd_billing_info: 0" (different capitalization,
and
underscores instead of hyphens), so that mod_proxy (or some other Apache
mechanism I am not aware of) seems to have secretly "normalized" these
headers in a way that the "Header unset" directive (which works case
sensitive,
and what about matching "_" to "-"?) surely didn't find what it looked for.
After adapting my "Header unset" directives everything went smoothly.
This might be worth some note "for the unwary" in the documentation:
"You need to specify what Apache received, not what you see Apache made out
of it".
Regards, Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Some notes about
http://httpd.apache.org/docs-2.0/mod/mod_headers .html
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 12:11 PM 7/17/2003, Joshua Slive wrote:
>On Thu, 17 Jul 2003 Michael.Schroepl@telekurs.de wrote:
>
>> Besides these containers, Apache 2.0 now supports the new <Proxy> container
>> (http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxy).
>> So what about using mod_headers to "edit" HTTP headers of content that is
>> just
>> being embedded via ProxyPass? At which position inside the evaluation
>> sequence
>> would <Proxy> appear in this case?
>
>That section should probably be removed (or shortened) and a reference to
>http://httpd.apache.org/docs-2.0/sections.html#mergin
>included instead. Of course, the sections doc is also pretty short on
>references to <Proxy> containers. I don't know that code well enough to
>fix it.
<Proxy> shouldn't appear in .htaccess (think about it, if you are mapping to
a proxy you aren't mapping to a server.)
<Proxy> blocks are processed while serving requests in exactly the same
logical 'order' as the old classic <Directory "proxy:..."> blocks were.
That is, after the first pass at <Location>, but before the second section
combines <Proxy> blocks with the appropriate <Location> blocks.
As far as nesting, I cannot concieve of them falling into other <Directory>,
<Files> or <Location> blocks, but of course they must be available within
the <VirtualHost> blocks.
Conversely, any directive valid in a <Location> should be valid within
the <Proxy> block. E.g. <Proxy> and <Directory> remain somewhat
of the same order, with <Location> being more authoritative,
so anything that you would do within <Location> or <Directory> that
doesn't relate to the file system (no file system - we are speaking of
a proxied location) can be placed within a <Proxy> block.
Does this shed any light on your question? If not would you restate the Q?
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Some notes about http://httpd.apache.org/docs-2.0/mod/mod_headers
.html
Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 17 Jul 2003 Michael.Schroepl@telekurs.de wrote:
>
> http://httpd.apache.org/docs-2.0/mod/mod_headers.html#order
> tells me:
> "They are valid in the main server config and virtual host sections,
> inside
> <Directory>, <Location> and <Files> sections, and within .htaccess files."
>
> Besides these containers, Apache 2.0 now supports the new <Proxy> container
> (http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxy).
> So what about using mod_headers to "edit" HTTP headers of content that is
> just
> being embedded via ProxyPass? At which position inside the evaluation
> sequence
> would <Proxy> appear in this case?
That section should probably be removed (or shortened) and a reference to
http://httpd.apache.org/docs-2.0/sections.html#mergin
included instead. Of course, the sections doc is also pretty short on
references to <Proxy> containers. I don't know that code well enough to
fix it.
> When I tried to remove certain other headers as well, this didn't work at
> first.
This sounds like a bug that could be reported to the bug database, rather
than a documentation issue.
Joshua.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org