Received: by taz.hyperreal.com (8.7.6/V2.0) id LAA24380; Wed, 13 Nov 1996 11:09:19 -0800 (PST) Received: from relay-6.mail.demon.net by taz.hyperreal.com (8.7.6/V2.0) with SMTP id LAA24370; Wed, 13 Nov 1996 11:09:15 -0800 (PST) Received: from aaaaaaaa.demon.co.uk ([158.152.178.85]) by relay-5.mail.demon.net id aa521277; 13 Nov 96 17:44 GMT Received: (from andrew@localhost) by aaaaaaaa.demon.co.uk (8.7.6/8.6.9) id RAA00351 for new-httpd@hyperreal.com; Wed, 13 Nov 1996 17:43:55 GMT Received: from relay-6.mail.demon.net (punt2.demon.co.uk [194.217.242.5]) by aaaaaaaa.demon.co.uk (8.7.6/8.6.9) with SMTP id RAA00315 for ; Wed, 13 Nov 1996 17:37:15 GMT Received: from relay-6.mail.demon.net by mailstore for andrew@aaaaaaaa.demon.co.uk id 847906618:6:28588:0; Wed, 13 Nov 96 17:36:58 GMT Received: from icarus.demon.co.uk ([158.152.10.55]) by relay-6.mail.demon.net id aa628540; 13 Nov 96 17:36 GMT Received: (from andrew@localhost) by icarus.demon.co.uk (8.6.12/8.6.6) id TAA16010; Wed, 13 Nov 1996 19:35:52 +0100 Date: Wed, 13 Nov 1996 19:35:52 +0100 Message-Id: <199611131835.TAA16010@icarus.demon.co.uk> From: Andrew Ford To: andrew@aaaaaaaa.demon.co.uk Subject: Alternative syntax for expires directive Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Andrew Looking at mod_expires.c in today's 1.2beta I have a suggestion to improve the syntax, namely that the words "in", "after" and "aged" should be accepted for the ExpiresDefault and ExpiresByType directives. This makes them read in a more English-like way, i.e. ExpiresDefault "in 30 days" (or ExpiresDefault "after 30 days") rather than ExpiresDefault "access plus 30 days" and ExpiresDefault "aged 2 weeks" rather than ExpiresDefault "modification plus 2 weeks" "in" and "after" should be synonyms for "access"; and "aged" a synonym for "modification". The only problem is that the code currently really only looks at the first character of the keyword, but arguably users shouldn't rely on that behaviour. Regards Andrew -- Andrew Ford Email: andrew@icarus.demon.co.uk Independent Software Consultant WWW: http://www.nhbs.co.uk/aford/ "Brittany", Wells Road, Tel: +44 1452 770836 Fax: 770835 Eastcombe, Stroud, GL6 7EE, GB Mobile: +44 385 258278 *** mod_expires.c.orig Wed Nov 13 18:26:26 1996 --- mod_expires.c Wed Nov 13 18:30:16 1996 *************** *** 256,264 **** */ word = getword_conf( pool, &code ); if ( !strncasecmp( word, "now", 1 ) || ! !strncasecmp( word, "access", 1 ) ) { base = 'A'; ! } else if ( !strncasecmp( word, "modification", 1 ) ) { base = 'M'; } else { return pstrcat( pool, "bad expires code, unrecognised '", --- 256,267 ---- */ word = getword_conf( pool, &code ); if ( !strncasecmp( word, "now", 3 ) || ! !strncasecmp( word, "in", 2 ) || ! !strncasecmp( word, "after", 5 ) || ! !strncasecmp( word, "access", 6 ) ) { base = 'A'; ! } else if ( !strncasecmp( word, "modification", 12 ) || ! !strncasecmp( word, "aged", 3 ) ) { base = 'M'; } else { return pstrcat( pool, "bad expires code, unrecognised '",