Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [ApacheGallery] help with chached files needed!



hello Andreas,

>> The problem is that Apache2 seems to be confused about the path of the
>> thumbnail is.
sure it will be confused! any server would be confused when asked for
non-existing file.
look what happens:
1. user requests a page.
2. A::G is response handler, so it gets the request and generates a
page with links to thumbnails, menu, etc.
3. browser gets a page with links to thumbnails that look like
<a href="/gallery/diving/10.2002/DSC00438.JPG"><img alt="DSC00438.JPG - 2002:11:10 13:16:23" src="/gallery/diving/10.2002/.cache/100x75-DSC00438.JPG" width="100" height="75"></a>
4. page loads ok (this is plain/text, no problem)
5. browser continues to request all those <img src="./cache/bla-bla-bla"> links
6. A::G again receives a request and sees that .cache is requested
(if ($r->uri =~ m/\.cache\//i) {...)
7. A::G is smart enough to take thumbnail from GalleryCacheDir and
sendfile() (for Apache2) and this cycles for every thumbnail on the
page.  my $subr = $r->lookup_file($file);
   if (MP2) {
     $r->sendfile($file);
   }
8. then A::G returns decline to apache so it will handle non-existing
file itself - here the confuse begins
this is funny, cause file has already been sent by this time, but
server gets an error.
>> I think making ApacheGallery only change the file path
>> in a PerlTransHandler instead of at the PerlResponseHandler stage
>> fixes the problem, but don't have a fix as a tidy patch (though I have
>> tested this theory).
i think this isn't PerlTransHandler or PerlResponseHandler issue.
PerlResponseHandler is ok anyway.

APJ> I believe that all Michael's Apache2 patches are highly experimental,
APJ> so any additions are very welcome.

APJ> Afaics, we use sendfile to ship the file under Apache2, so OK would
APJ> probably be the correct return code.
could anyone test this OK with apache 1.3. server? i tried to build it
on my host, but mod_perl tests don't pass and i don't have time for
finding out the reasons. i hope that Apache::Constants::OK would good
also for 1.3 servers too. it needs to be just checked.

-- 
br
[email protected]

_______________________________________________
users mailing list
[email protected]
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers