On Wed, 2006-09-06 at 12:33 -0300, Guilherme Salgado wrote: > Hi there, > > Today I was checking if it'd be possible to use squid to proxy FTP HEAD > requests for me, and although I found that this is handled in src/ftp.c > and using libwww-perl's GET to issue a HEAD request on an existent file > gave me a 200 OK response, I noticed that I'll always get a 200 OK > response, even when the file in question doesn't exist: .. > So, is this the intended behaviour? If so, would it be possible to > workaround it and have a 404 response in the latter case? > > If not, should I file a bug about it? How hard would it be to fix?
I've filed http://www.squid-cache.org/bugs/show_bug.cgi?id=1758 based on your description. The code quite definately does short circuit on HEAD requests. At a guess its because FTP has no reliable query mechanism - many FTP servers have different output for ls, and theres no guarantee that any accessible file will be included in ls output. However, I think the current behaviour is entirely bogus, and we should be able to do a RETR followed by a hard close of the data channel to simulate GET for FTP. I've copied this to squid-dev for development discussion, please follow-up there. Cheers Rob -- GPG key available at: <http://www.robertcollins.net/keys.txt>.
signature.asc
Description: This is a digitally signed message part
