You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Thomas Bolioli <we...@musicyellowpages.com> on 1999/04/21 21:31:20 UTC
mod_expires/4286: ExpiresByType using mod_expires uses AddType source for mime/types and not mime.types declarations
>Number: 4286
>Category: mod_expires
>Synopsis: ExpiresByType using mod_expires uses AddType source for mime/types and not mime.types declarations
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: doc-bug
>Submitter-Id: apache
>Arrival-Date: Wed Apr 21 12:40:02 PDT 1999
>Last-Modified:
>Originator: webmaster@musicyellowpages.com
>Organization:
apache
>Release: 1.2.6
>Environment:
BSD/OS musicyellowpages.com 3.1 BSDI BSD/OS 3.1 Virtual Kernel #17: Tue Dec 22 1
0:30:12 MST 1998 root:/usr/src/sys/compile/VKERN i386
>Description:
Below is a portion of our httpd.conf. The FYI I left others in my org. should explain every thing in context better than a diatribe from me. After that is the text/* segment of our mime.types file.
ServerName www.musicyellowpages.com
AddType text/x-server-parsed-html .shtml
AddType application/x-httpd-cgi .cgi
AddType application/x-httpd-cgi .pl
AddType text/x-server-parsed-html .html
AddType text/x-server-parsed-html .htm
AddType text/x-server-parsed-html .inc
ExpiresActive on
ExpiresByType application/x-httpd-cgi A120
ExpiresByType text/x-server-parsed-html "access plus 120 seconds"
# Doesn't work
# ExpiresByType text/html A120
###FYI undocumented quirk: mod_expires uses the initial mime/type for the
# file and not the served mime/type. ie; since we are using *.htm
# in place of *.shtml, our internal mime/type is parsed (via addtype)
# however the output is just text/html since this is derived from the
# file mime.types
# In other words AddType overrides mime.types declarations when dealing
# with a file internally yet fails to override those declarations in
# the header sent to the client. mod_expires doesn't pull mime/types from
# mime.types or at least not until it has checked the current env. for
# AddType declarations.
ExpiresByType text/html A120
# OK, it works but not on *.htm, *.html, *.inc, *.cgi, and *.pl exts.
# Maybe, we should use *.shtml for static pages
# Header append Cache-Control must-revalidate
# mime.types file segment
text/html html htm
text/x-sgml sgml sgm
text/plain txt
text/richtext rtx
text/tab-separated-values tsv
text/x-setext etx
>How-To-Repeat:
use *.htm and *.html as a text/server-parsed-html mime/type using AddType directive as above. Then use ExpiresByType text/html A###. The output headers will show Content-Type: text/html but no Expires: header.
>Fix:
Just document it with the mod_expires directives and if this is more serious than I think it is, put it onto the "Maybe Tommorrow, TODO list".
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]