>Number: 665
>Category: mod_mime
>Synopsis: Incorrect content-type for `foo.ps.gz' file
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Jun 3 08:20:00 1997
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>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:
>Unformatted: