www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fergus Henderson <...@cs.mu.oz.au>
Subject mod_mime/665: Incorrect content-type for `foo.ps.gz' file
Date Tue, 03 Jun 1997 15:20:01 GMT

>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:     fjh@cs.mu.oz.au
>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:



Mime
View raw message