On Fri, Jul 06, 2001 at 09:54:12AM -0400, Geoffrey Young wrote: > > > > -----Original Message----- > > From: barries [mailto:[EMAIL PROTECTED]] > > Sent: Friday, July 06, 2001 9:38 AM > > To: Paul Sharpe > > Cc: [EMAIL PROTECTED] > > Subject: $r->finfo stability? [Was: lookup_uri() returns 200 when 404 > > expected] > > > > > [snip] > > > Anyone else have good/bad experience w/ $r->finfo lately? > > just the -T/-B bug/feature I noted on the dev list the other day. still not > sure if I'm right about that, though... Saw that and assumed you were write: Perl definitely has to open the file and look at the first 512 to 1024 bytes, and Apache's finfo structure is just stat-able info in varying degrees from the OS itself. I just poked at it with strace: my $s = $r->lookup_uri($uri); warn "Doing -T finfo\n" ; my $t = -T $s->finfo ; warn $t ? 1 : 0, "\n" ; results in: stat("/home/barries/mpdh/www/htdocs/foo.html", {st_mode=S_IFREG|0664,st_size=0, ...}) = 0 write(2, "Doing -T finfo\n", 15) = 15 open("/home/barries/mpdh/www/lib/5.6.1/i686-linux",O_RDONLY|O_LARGEFILE) = 4 fstat(4, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 read(4, 0xbffff3cc, 512) = -1 EISDIR (Is a directory) close(4) = 0 write(2, "0\n", 2) = 2 Pretty neat... - Barrie