RE: mod_headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Dan Nelson [mailto:dan.nelson@xxxxxxxxxxxxxxx] 
> Sent: Thursday, November 23, 2006 4:29 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject:  mod_headers
> 
> 
> I'm running Apache 2.0 on Debian Sarge.
> 
> I have a non-standard application for Apache, and don't want 
> to send any
> headers in the response.  I thought I'd be able to do so using
> mod_headers.
> 
> I can use the 'Header' directive to add my own header, and then append
> to and unset it.  But using the same syntax, I can't have any 
> effect on
> the standard headers such as 'Server:' and 'Date:'.
> 
> Header unset Server
> Header append Server "hello world"
> Header unset Connection:
> 
> None of the above has any effect.  These statements are in a virtual
> host section.

RFC 2616 doesn't actually state that any response headers *must* be set
and there is nothing in the mod_headers docs to say that you *cannot*
unset Server, for example... however, if your prescription above *did*
work, that would be a trivial way to solve the old
"how-do-I-suppress-the-server-header-?" question, which is the second
most frequently asked question on this list... I've never seen that
solution proposed, so I'd guess it can't be done.

Without delving into the code, I'd guess that some of the more standard
headers are hard-coded in at a late stage in the processing - after the
mod_header filter. If that's the case, and since you have a non-standard
app, the simplest thing might be to use the source - hack out the
headers you don't like and recompile.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 


> 
> Is there some way to remove these headers?
> 
> Thanks
> 
> Dan
> 
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux