You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Thom May <th...@planetarytramp.net> on 2003/03/20 15:30:52 UTC

x-gzip content-encoding on downloads in /dist/

It seems like setting the x-gzip content encoding in /dist/ is causing a variety
of breakage. 
MD5 sums and signatures for tar.gzs are being sent with ContentType x-gzip, 
causing mozilla to try and uncompress a plain text file
tar.gz files are uncompressed when they're downloaded, so the md5 sums are
incorrect for the file on the disk.
Does anyone have any objections to me removing the encoding for *.gz* 
encoding everywhere under /dist?
Cheers,
-Thom

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: x-gzip content-encoding on downloads in /dist/

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Thom May wrote:
> It seems like setting the x-gzip content encoding in /dist/ is causing a variety
> of breakage. 
> MD5 sums and signatures for tar.gzs are being sent with ContentType x-gzip, 
> causing mozilla to try and uncompress a plain text file
> tar.gz files are uncompressed when they're downloaded, so the md5 sums are
> incorrect for the file on the disk.
> Does anyone have any objections to me removing the encoding for *.gz* 
> encoding everywhere under /dist?

in the past i believe this was addressed by the order in which the
addtype/addencoding directives appeared in the .htaccess file.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: x-gzip content-encoding on downloads in /dist/

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 11:27 AM 3/20/2003, Henk P. Penning wrote:
>> From: Thom May <th...@planetarytramp.net>
>> Does anyone have any objections to me removing the encoding for *.gz*
>> encoding everywhere under /dist?
>
>  .. and/or add
>
>    AddType text/plain .md5 .asc
>
>  in 'dist/.htaccess' ??

Thom wasn't asking about the Content-Type, but the Content-Encoding header.
I've observed Mozilla and other browser attempt to un-gzip any content if the
Content-Encoding header is set.  Instead of "Save File As" a .tar.gz, you
discover that you just have a .tar, which won't match the .md5 or .asc
signature we provided.  I believe that any .tar.gz "package" shouldn't carry
a Content-Encoding: gzip designation, but should set content-type: tar/x-gzip
so that the client doesn't try to do decompression upon receipt.

Simply removing the Content-Encoding designation will cause the browser
to respect our Content-Type for .md5 and .asc files.

Your's and Ken Coar's question highlight a common misunderstanding.
Apache's mod_mime maps extensions by content-type, charset, language,
and encoding (document metadata), as well as the handler, input and output 
filters (behavioral metadata.)  

The only override between two distinct items in that list above, is that the
content-type will replace the charset, if a content-type filename extension 
follows the charset.  E.g. .txt.en can aggregate a content-type header
of text/plain; charset=ISO8859-1 while .en.txt cannot do so since the
text/plain value overwrites the entire content-type header.  But all other
values in that list are independent of one another.

Bill 


Re: x-gzip content-encoding on downloads in /dist/

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Thom May wrote:
> It seems like setting the x-gzip content encoding in /dist/ is causing a variety
> of breakage. 
> MD5 sums and signatures for tar.gzs are being sent with ContentType x-gzip, 
> causing mozilla to try and uncompress a plain text file
> tar.gz files are uncompressed when they're downloaded, so the md5 sums are
> incorrect for the file on the disk.
> Does anyone have any objections to me removing the encoding for *.gz* 
> encoding everywhere under /dist?

in the past i believe this was addressed by the order in which the
addtype/addencoding directives appeared in the .htaccess file.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: x-gzip content-encoding on downloads in /dist/

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 11:27 AM 3/20/2003, Henk P. Penning wrote:
>> From: Thom May <th...@planetarytramp.net>
>> Does anyone have any objections to me removing the encoding for *.gz*
>> encoding everywhere under /dist?
>
>  .. and/or add
>
>    AddType text/plain .md5 .asc
>
>  in 'dist/.htaccess' ??

Thom wasn't asking about the Content-Type, but the Content-Encoding header.
I've observed Mozilla and other browser attempt to un-gzip any content if the
Content-Encoding header is set.  Instead of "Save File As" a .tar.gz, you
discover that you just have a .tar, which won't match the .md5 or .asc
signature we provided.  I believe that any .tar.gz "package" shouldn't carry
a Content-Encoding: gzip designation, but should set content-type: tar/x-gzip
so that the client doesn't try to do decompression upon receipt.

Simply removing the Content-Encoding designation will cause the browser
to respect our Content-Type for .md5 and .asc files.

Your's and Ken Coar's question highlight a common misunderstanding.
Apache's mod_mime maps extensions by content-type, charset, language,
and encoding (document metadata), as well as the handler, input and output 
filters (behavioral metadata.)  

The only override between two distinct items in that list above, is that the
content-type will replace the charset, if a content-type filename extension 
follows the charset.  E.g. .txt.en can aggregate a content-type header
of text/plain; charset=ISO8859-1 while .en.txt cannot do so since the
text/plain value overwrites the entire content-type header.  But all other
values in that list are independent of one another.

Bill 


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: x-gzip content-encoding on downloads in /dist/

Posted by "Henk P. Penning" <he...@cs.uu.nl>.
On Thu, 20 Mar 2003, Thom May wrote:

> Date: Thu, 20 Mar 2003 14:30:52 +0000
> From: Thom May <th...@planetarytramp.net>
> To: "infrastructure@apache.org" <in...@apache.org>,
>      "docs@httpd.apache.org" <do...@httpd.apache.org>,
>      "dev@httpd.apache.org" <de...@httpd.apache.org>
> Subject: x-gzip content-encoding on downloads in /dist/

> Does anyone have any objections to me removing the encoding for *.gz*
> encoding everywhere under /dist?

  .. and/or add

    AddType text/plain .md5 .asc

  in 'dist/.htaccess' ??

> -Thom

  HPP

Henk P. Penning, Dept of Computer Science, Utrecht University \__/  \
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. \__/
Telephone: +31-30-2534106, fax: 2513791, NIC-handle: HPP1 _/  \__/  \
News.answers http://www.cs.uu.nl/cgi-bin/faqwais     \__/  \__/  \__/


Re: x-gzip content-encoding on downloads in /dist/

Posted by "Henk P. Penning" <he...@cs.uu.nl>.
On Thu, 20 Mar 2003, Thom May wrote:

> Date: Thu, 20 Mar 2003 14:30:52 +0000
> From: Thom May <th...@planetarytramp.net>
> To: "infrastructure@apache.org" <in...@apache.org>,
>      "docs@httpd.apache.org" <do...@httpd.apache.org>,
>      "dev@httpd.apache.org" <de...@httpd.apache.org>
> Subject: x-gzip content-encoding on downloads in /dist/

> Does anyone have any objections to me removing the encoding for *.gz*
> encoding everywhere under /dist?

  .. and/or add

    AddType text/plain .md5 .asc

  in 'dist/.htaccess' ??

> -Thom

  HPP

Henk P. Penning, Dept of Computer Science, Utrecht University \__/  \
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. \__/
Telephone: +31-30-2534106, fax: 2513791, NIC-handle: HPP1 _/  \__/  \
News.answers http://www.cs.uu.nl/cgi-bin/faqwais     \__/  \__/  \__/


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org