in reply to Re: Last mod not working
in thread Last mod not working

Even with that, it still sometimes doesn't return the mod time. Try:
use Data::Dumper; print Dumper head($url);
I get:
$VAR1 = 'text/html; charset=ISO-8859-1'; $VAR2 = undef; $VAR3 = undef; $VAR4 = undef; $VAR5 = 'Apache/1.3.29 (Unix) PHP/4.3.4 mod_perl/1.29';

Replies are listed 'Best First'.
Re: Re: Re: Last mod not working
by derby (Abbot) on Jan 28, 2004 at 20:22 UTC
    Last The definition of Last-Modified leaves some lee-way for the servers:

    HTTP/1.1 servers SHOULD send Last-Modified whenever feasible.

    So when is it not feasible? Well, some servers leave it up to an application server (or cgi script, or SSI handler) to send the header for dynamically created pages. I know I rarely set it for cgi scripts since the cost of keeping track of changes, to me, outweighs the cost of just sending the content. So you cannot depend on it being there. You will get it from most web servers for static content but how do you know what's static and what's not (think rewrite rules).

    -derby