Received: (qmail 19518 invoked by uid 2012); 21 Apr 1999 19:31:20 -0000 Message-Id: <19990421193120.19517.qmail@hyperreal.org> Date: 21 Apr 1999 19:31:20 -0000 From: Thomas Bolioli Reply-To: webmaster@musicyellowpages.com To: apbugs@hyperreal.org Subject: ExpiresByType using mod_expires uses AddType source for mime/types and not mime.types declarations X-Send-Pr-Version: 3.2 >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: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: apache >Arrival-Date: Wed Apr 21 12:40:02 PDT 1999 >Closed-Date: Tue May 08 20:42:30 PDT 2001 >Last-Modified: Tue May 08 20:42:30 PDT 2001 >Originator: webmaster@musicyellowpages.com >Release: 1.2.6 >Organization: >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". >Release-Note: >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: coar State-Changed-When: Thu Apr 29 12:25:35 PDT 1999 State-Changed-Why: Try following the directions in the mod_include documentation; instead of using "AddType text/x-..." use "AddType text/html .htm" and "AddHandler server-parsed .htm" and see if that works better for you. Comment-Added-By: coar Comment-Added-When: Wed Jun 7 11:41:18 PDT 2000 Comment-Added: [This is a standard response.] This Apache problem report has not been updated recently. Please reply to this message if you have any additional information about this issue, or if you have answers to any questions that have been posed to you. If there are no outstanding questions, please consider this a request to try to reproduce the problem with the latest software release, if one has been made since last contact. If we don't hear from you, this report will be closed. If you have information to add, BE SURE to reply to this message and include the apbugs@Apache.Org address so it will be attached to the problem report! State-Changed-From-To: feedback-closed State-Changed-By: slive State-Changed-When: Tue May 8 20:42:29 PDT 2001 State-Changed-Why: [This is a standard response.] No response from submitter, assuming issue has been resolved. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include 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! ]