Mathopd was missing http header values for file cache settings so I added a
function called MaxAge which defaults to 300 seconds (5 minutes) but can be
set to any value using the configuration option MaxAge.  Here's a before and
after header:

Before:

HTTP/1.1 200 OK
Server: Mathopd/1.3pl7
Date: Mon, 18 Mar 2002 23:31:50 GMT
Content-type: image/gif
Content-length: 4542
Last-Modified: Fri, 06 Apr 2001 06:32:25 GMT
Connection: Close

After:

HTTP/1.1 200 OK
Server: Mathopd/1.3pl7
Date: Mon, 18 Mar 2002 23:31:50 GMT
Cache-Control: public, max-age=604800
Expires: Mon, 25 Mar 2002 23:31:50 GMT
Content-type: image/gif
Content-length: 4542
Last-Modified: Fri, 06 Apr 2001 06:32:25 GMT
Connection: Close

I set the MaxAge in my configuration to 604800 (one week) because I'm only
serving images with mathopd and setting all images to not cache till after a
week seems to work well.  The modified source code could not be attached
(this list doesn't support attachments it seems) so if you want the code
you'll have
to send me a request.

Next I'm working on mod_rewrite-like referrer checking that will issue a 403
error if the referrer isn't the same as the host domain (or empty).  Unless
Michiel Boland beats me to it =)

Tim

Reply via email to