From nobody@hyperreal.com Tue Jun 3 08:15:38 1997 Received: (from nobody@localhost) by hyperreal.com (8.8.5/8.8.5) id IAA25555; Tue, 3 Jun 1997 08:15:38 -0700 (PDT) Message-Id: <199706031515.IAA25555@hyperreal.com> Date: Tue, 3 Jun 1997 08:15:38 -0700 (PDT) From: Fergus Henderson Reply-To: fjh@cs.mu.oz.au To: apbugs@hyperreal.com Subject: Incorrect content-type for `foo.ps.gz' file X-Send-Pr-Version: 3.2 >Number: 665 >Category: mod_mime >Synopsis: Incorrect content-type for `foo.ps.gz' file >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Jun 3 08:20:00 1997 >Last-Modified: Sun Jun 8 20:33:29 PDT 1997 >Originator: fjh@cs.mu.oz.au >Organization: >Release: 1.1.3 >Environment: Any >Description: For any file with an extension such as `.ps.gz', Apache returns Content-Type: application/x-gzip Content-Encoding: x-gzip This is incorrect. The content-type should be application/postscript. >How-To-Repeat: >Fix: The following two-line patch helps. But really you ought to rewrite the whole loop that processes filename extensions. --- mod_mime.c.orig Sat Jun 8 06:19:01 1996 +++ mod_mime.c Tue Jun 3 23:46:59 1997 @@ -243,7 +243,8 @@ /* Check for Content-Type */ if ((type = table_get (conf->forced_types, ext)) || (type = table_get (hash_buckets[hash(*ext)], ext))) { - r->content_type = type; + if (!r->content_type) + r->content_type = type; found = 1; } %0 >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: marc State-Changed-When: Sun Jun 8 20:33:28 PDT 1997 State-Changed-Why: The change you propose is bogus. Consider a file named foo.jpeg.gif. Before your change it would be sent as a gif, as it should, after it would be sent as a jpeg. Your problem probably comes from having both a content-type and content-encoding for .gz files. Remove the AddType or entry in your mime.types for .gz files and things will work as they should. >Unformatted: