> -----Original Message-----
> From: darren chamberlain [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 8:28 AM
> To: '[EMAIL PROTECTED]'
> Subject: Re: missing mtime in request rec?

[snip]

> 
> Add a "use Apache::File;" to the top of the module. See p 492 of
> the Eagle book; mtime is one of the methods added to the Apache
> class when you use Apache::File.

well, I know that :)  I'm not saying that $r->mtime produces a runtime error
(which would happen if I didn't use() Apache::File), but that it returns Jan
1, 1970 for anything that isn't handled by the default Apache handler...

#!/usr/bin/perl

use Apache::File;
use Apache::Util qw(ht_time);

my $r = shift;
$r->send_http_header('text/plain');
print ht_time($r->mtime), "\n";
print ht_time((stat $r->finfo)[9]), "\n";


in my mind, at least, those two calls ought to be the same.  if you insert a
call to $r->update_mtime all is ok.  

but, it would seem that if r->mtime is the modification time of the
requested file, r->mtime ought to be set when Apache stats the file and
inserts the other finfo stuff.

but I'll exchange my logic for proof that not setting mtime is intentional
:)

--Geoff 

Reply via email to