You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Davide COntini <da...@chronotique.fr> on 2001/10/23 11:59:38 UTC

mod_expires/8602: ExpiresByType seems not to work

>Number:         8602
>Category:       mod_expires
>Synopsis:       ExpiresByType seems not to work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          support
>Submitter-Id:   apache
>Arrival-Date:   Tue Oct 23 03:00:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     davide.contini@chronotique.fr
>Release:        1.3.12
>Organization:
apache
>Environment:
WIndows NT 4 sp6 / 2000 as
>Description:
Here's my problem :
I try to set expire delay for GIF and JPG different by the default delay.
I work with Apache 1.3.12 and Tomcat 3.2.1 as JSP server.
(I tried with Apache 1.3.22, but result is the same).

Here're the directives I put in conf/httpd.conf :

################################################
...
LoadModule expires_module modules/ApacheModuleExpires.dll
...
################################################
ExpiresActive On
ExpiresDefault "now plus 1 seconds"

ExpiresByType text/html "now plus 1 days"
ExpiresByType image/gif "now plus 1 days"
ExpiresByType image/jpeg "now plus 1 days"
################################################

I tested this config with IExplorer 5.0, page "index.html" : 

-------------------------------------------------------------------------------
<HTML>
<HEAD>
<TITLE>Module Intranet Standard version 3.20</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
...
	<IMG SRC="img/bienvenue_02.gif" WIDTH=4 HEIGHT=34></TD>
...
	<IMG src='/modintrachronotique/img/entrer.jpg' border=0 alt='Entrer'>
...	
</BODY>
</HTML>
-------------------------------------------------------------------------------

and I checked cache directory where I found following files : 

Expire date			File
-------------------------------------------------------------------------------
22/10/2001  18:07                   61 bienvenue_02[1].gif
...
22/10/2001  18:07                3�041 entrer[1].jpeg
23/10/2001  18:07                4�768 index[1].html

Where dates aren't good (must be 23/10/2001 for each file, not for only html file)
This happens testing on two servers (one Windows NT4 sp6 and one Windows 2000 Advanced Server, IIS desactivated)
It doesn't happens on a server with Windows NT4 Workstation. On last server dates are correct.

Here're packets from a net sniffer, which captured communication between server and client :
=====================================================================
Date/time of test : 22 oct 2001 18:07

No:                 3
MAC source address: xxxxxxxxx
MAC dest address:   xxxxxxxxxxxx 
Protocol:           TCP->HTTP IP
Source IP address:  CLIENT
Dest IP address:    SERVER
Destination port:   80
Source port:        2330
...

Packet data:
0000:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0010:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0020:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0030:  xx xx xx xx 00 00 47 45 54 20 2F 6D 6F 64 69 6E Dps...GET /modin
0040:  74 72 61 63 68 72 6F 6E 6F 74 69 71 75 65 2F 69 trachronotique/i
0050:  6D 67 2F 62 69 65 6E 76 65 6E 75 65 5F 30 32 2E mg/bienvenue_02.
0060:  67 69 66 20 48 54 54 50 2F 31 2E 31 0D 0A 41 63 gif HTTP/1.1..Ac
0070:  63 65 70 74 3A 20 2A 2F 2A 0D 0A 41 63 63 65 70 cept: */*..Accep
0080:  74 2D 4C 61 6E 67 75 61 67 65 3A 20 66 72 0D 0A t-Language: fr..
0090:  41 63 63 65 70 74 2D 45 6E 63 6F 64 69 6E 67 3A Accept-Encoding:
00A0:  20 67 7A 69 70 2C 20 64 65 66 6C 61 74 65 0D 0A  gzip, deflate..
00B0:  55 73 65 72 2D 41 67 65 6E 74 3A 20 4D 6F 7A 69 User-Agent: Mozi
00C0:  6C 6C 61 2F 34 2E 30 20 28 63 6F 6D 70 61 74 69 lla/4.0 (compati
00D0:  62 6C 65 3B 20 4D 53 49 45 20 35 2E 30 31 3B 20 ble; MSIE 5.01; 
00E0:  57 69 6E 64 6F 77 73 20 4E 54 20 35 2E 30 29 0D Windows NT 5.0).
00F0:  0A 48 6F 73 74 3A 20 73 79 64 6E 65 79 0D 0A 43 .Host: sydney..C
0100:  6F 6E 6E 65 63 74 69 6F 6E 3A 20 4B 65 65 70 2D onnection: Keep-
0110:  41 6C 69 76 65 0D 0A 0D 0A                      Alive....

=====================================================================

No:                 4
MAC source address: xxxxxxxxx
MAC dest address:   xxxxxxxxxxxx 
Protocol:           TCP->HTTP IP
Source IP address:  SERVER
Dest IP address:    CLIENT
Destination port:   2330
Source port:        80
... 

Packet data:
0000:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0010:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0020:  xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ................
0030:  xx xx xx xx 00 00 48 54 54 50 2F 31 2E 31 20 32 !U....HTTP/1.1 2
0040:  30 30 20 4F 4B 0D 0A 44 61 74 65 3A 20 4D 6F 6E 00 OK..Date: Mon
0050:  2C 20 32 32 20 4F 63 74 20 32 30 30 31 20 31 35 , 22 Oct 2001 15
0060:  3A 35 34 3A 30 39 20 47 4D 54 0D 0A 53 65 72 76 :54:09 GMT..Serv
0070:  65 72 3A 20 41 70 61 63 68 65 2F 31 2E 33 2E 31 er: Apache/1.3.1
0080:  32 20 28 57 69 6E 33 32 29 20 41 70 61 63 68 65 2 (Win32) Apache
0090:  4A 53 65 72 76 2F 31 2E 31 0D 0A 53 65 72 76 6C JServ/1.1..Servl
00A0:  65 74 2D 45 6E 67 69 6E 65 3A 20 54 6F 6D 63 61 et-Engine: Tomca
00B0:  74 20 57 65 62 20 53 65 72 76 65 72 2F 33 2E 32 t Web Server/3.2
00C0:  2E 31 20 28 4A 53 50 20 31 2E 31 3B 20 53 65 72 .1 (JSP 1.1; Ser
00D0:  76 6C 65 74 20 32 2E 32 3B 20 4A 61 76 61 20 31 vlet 2.2; Java 1
00E0:  2E 32 2E 32 3B 20 57 69 6E 64 6F 77 73 20 4E 54 .2.2; Windows NT
00F0:  20 34 2E 30 20 78 38 36 3B 20 6A 61 76 61 2E 76  4.0 x86; java.v
0100:  65 6E 64 6F 72 3D 53 75 6E 20 4D 69 63 72 6F 73 endor=Sun Micros
0110:  79 73 74 65 6D 73 20 49 6E 63 2E 29 0D 0A 43 61 ystems Inc.)..Ca
0120:  63 68 65 2D 43 6F 6E 74 72 6F 6C 3A 20 6D 61 78 che-Control: max
0130:  2D 61 67 65 3D 31 0D 0A 45 78 70 69 72 65 73 3A -age=1..Expires:
0140:  20 4D 6F 6E 2C 20 32 32 20 4F 63 74 20 32 30 30  Mon, 22 Oct 200
0150:  31 20 31 35 3A 35 34 3A 31 30 20 47 4D 54 0D 0A 1 15:54:10 GMT..
0160:  43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 74 68 3A 20 Content-Length: 
0170:  36 31 0D 0A 4C 61 73 74 2D 4D 6F 64 69 66 69 65 61..Last-Modifie
0180:  64 3A 20 57 65 64 2C 20 31 32 20 53 65 70 20 32 d: Wed, 12 Sep 2
0190:  30 30 31 20 31 33 3A 31 33 3A 31 38 20 47 4D 54 001 13:13:18 GMT
01A0:  0D 0A 4B 65 65 70 2D 41 6C 69 76 65 3A 20 74 69 ..Keep-Alive: ti
01B0:  6D 65 6F 75 74 3D 31 35 2C 20 6D 61 78 3D 31 30 meout=15, max=10
01C0:  30 0D 0A 43 6F 6E 6E 65 63 74 69 6F 6E 3A 20 4B 0..Connection: K
01D0:  65 65 70 2D 41 6C 69 76 65 0D 0A 43 6F 6E 74 65 eep-Alive..Conte
01E0:  6E 74 2D 54 79 70 65 3A 20 69 6D 61 67 65 2F 67 nt-Type: image/g
01F0:  69 66 0D 0A 0D 0A 47 49 46 38 39 61 04 00 13 00 if....GIF89a....
0200:  91 00 00 99 99 99 66 66 66 00 00 00 00 00 00 21 ......fff......!
0210:  F9 04 00 00 00 00 00 2C 00 00 00 00 04 00 13 00 .......,........
0220:  00 02 0E 8C 20 86 9A D7 EB 98 8C 14 DA 87 E7 65 .... ..........e
0230:  05 00 3B                                        ..;

=====================================================================
please notice that apache's answer (@0140) doesn't correspond to
settings related to his type (@01E0).

It seems to be a configuration problem, but I'm not able to find what.
Could give me an idea ?
>How-To-Repeat:

>Fix:
Configuration problem?
>Release-Note:
>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 make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database 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!     ]