You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1999/08/18 16:31:10 UTC
[Negotiation] How to get rid of a Content-Encoding: header?
Hmmm. I have a multiview enabled server. I mirror apache_1.3.6.tar.gz
and apache_1.3.6.tar.gz.asc with the following type and encoding settings:
AddEncoding x-gzip gz
<FilesMatch .*\.tar\.gz\.asc>
Header unset Content-Encoding
</FilesMatch>
# For the ascii PGP signature files, display the key icon and Lynx prefix:
AddAlt "KEY" .asc
AddIcon /icons/new/key.gif .asc
But no matter where in the configuration I add the
AddModule mod_headers.c
(i.e., before or after mod_negotiation), I cannot remove the
Content-Encoding: x-gzip
header line which is generated by mod_negotiation.
OTOH, at dev.apache.org you seem to successfully suppress it in the
dist/ directory (or is that a "not multiview-enabled" directory?)
What is the "correct" way to suppress it (in a directory which
should allow multiviews because mod_autoindex pulls in HEADER and
README files)?
While I'm at it:
I tried to replace a "Content-Location:" header which was generated by
mod_negotiation by a
Header add Content-Location "http://somewhere.else/"
While this is obviously wrong, so was mod_headers' output: it left the
original Content-Location header in there, and added
Content-Location "http://somewhere.else/" _twice_. Changing to
Header set Content-Location "http://somewhere.else/"
still left the original Content-Location header in there, and added
Content-Location "http://somewhere.else/" once.
How can that be, when mod_negotiation uses ap_table_setn():
ap_table_setn(r->err_headers_out, "Content-Location",
ap_pstrdup(r->pool, variant->file_name));
and so does mod_headers:
case hdr_set:
ap_table_setn(r->headers_out, hdr->header, hdr->value);
Ah! I see the point: One writes to err_headers_out, the other one
writes to headers_out!!! Okay, then which one is "the right one",
and ahould we update mod_headers to "unset" headers in both tables?
Martin
--
<Ma...@MchP.Siemens.De> | Siemens Information and
Phone: +49-89-636-46021 | Communication Products
FAX: +49-89-636-47816 | 81730 Munich, Germany
Re: [Negotiation] How to get rid of a Content-Encoding: header?
Posted by Spidaman The Defenestrator <sp...@salon.com>.
Did you try this?
<Files ~ ".*\.tar\.gz\.asc">
Options -Multiviews
</Files>
I think that should get the effect you want.
Meanwhile, back at the ranch...
> Hmmm. I have a multiview enabled server. I mirror apache_1.3.6.tar.gz
> and apache_1.3.6.tar.gz.asc with the following type and encoding settings:
> AddEncoding x-gzip gz
> <FilesMatch .*\.tar\.gz\.asc>
> Header unset Content-Encoding
> </FilesMatch>
> # For the ascii PGP signature files, display the key icon and Lynx prefix:
> AddAlt "KEY" .asc
> AddIcon /icons/new/key.gif .asc
>
> But no matter where in the configuration I add the
> AddModule mod_headers.c
> (i.e., before or after mod_negotiation), I cannot remove the
>
> Content-Encoding: x-gzip
>
> header line which is generated by mod_negotiation.
> OTOH, at dev.apache.org you seem to successfully suppress it in the
> dist/ directory (or is that a "not multiview-enabled" directory?)
>
> What is the "correct" way to suppress it (in a directory which
> should allow multiviews because mod_autoindex pulls in HEADER and
> README files)?
>
>
> While I'm at it:
> I tried to replace a "Content-Location:" header which was generated by
> mod_negotiation by a
> Header add Content-Location "http://somewhere.else/"
> While this is obviously wrong, so was mod_headers' output: it left the
> original Content-Location header in there, and added
> Content-Location "http://somewhere.else/" _twice_. Changing to
> Header set Content-Location "http://somewhere.else/"
> still left the original Content-Location header in there, and added
> Content-Location "http://somewhere.else/" once.
>
> How can that be, when mod_negotiation uses ap_table_setn():
> ap_table_setn(r->err_headers_out, "Content-Location",
> ap_pstrdup(r->pool, variant->file_name));
>
> and so does mod_headers:
> case hdr_set:
> ap_table_setn(r->headers_out, hdr->header, hdr->value);
>
> Ah! I see the point: One writes to err_headers_out, the other one
> writes to headers_out!!! Okay, then which one is "the right one",
> and ahould we update mod_headers to "unset" headers in both tables?
>
>
> Martin
>
--
Salon Internet http://www.salon.com/
HTTP mechanic, Perl diver, Mebwaster, Some of the above
Ian Kallen <id...@salon.com> / AIM: iankallen / Fax: (561) 619-0995