You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kris Verbeeck <kr...@chello.be> on 2003/06/09 15:26:14 UTC

[PATCH] PR 16521 -- caches MUST treat invalid Expires values as in the past

PR 16521 states that mod_cache caches and returns responses that have an 
invalid Expires header (value is 0 or yesterday).  The attached patch 
resolves this issue.

Some explanation:
- when apr_date_parse_http returns APR_DATE_BAD, the local variable 
containing the expires header was reset to NULL;
- the check a bit lower in the code:

	if (exps != NULL && exp == APR_DATE_BAD) {

would always fail because when exp equals APR_DATE_BAD, exps was always 
NULL.

--