]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
hno squid-2.3.DEVEL3.ftp_HEAD.patch
authorhno <>
Wed, 3 May 2000 02:20:10 +0000 (02:20 +0000)
committerhno <>
Wed, 3 May 2000 02:20:10 +0000 (02:20 +0000)
Squid-2.3.DEVEL3: HEAD and ftp://...

Support HEAD ftp://.. requests without fetching the whole object.

ChangeLog
src/ftp.cc

index c3c62597ae16bb672ab2e4d260eb26eb2dd073f1..f5e765de0d4de93dfee50ae9bcfec24db0bcdfd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@ Changes to Squid-2.4.DEVEL3 ():
        - Helpers are now restarted when the logs are rotated
        - Negatively cached DNS entries are now purged on "reload".
        - PURGE now also purges the DNS cache
+       - HEAD on FTP objects no longer retreives the whole object
 
 Changes to Squid-2.4.DEVEL2 ():
 
index df6db959f9bb255fca72a326323071ed193590ee..7994319196461a2d9b3e541c907588a28ab9d538 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.289 2000/03/06 16:23:31 wessels Exp $
+ * $Id: ftp.cc,v 1.290 2000/05/02 20:20:10 hno Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1645,6 +1645,14 @@ ftpSendPasv(FtpStateData * ftpState)
     int fd;
     struct sockaddr_in addr;
     socklen_t addr_len;
+    if (ftpState->request->method == METHOD_HEAD) {
+       /* Terminate here for HEAD requests */
+       ftpAppendSuccessHeader(ftpState);
+       storeTimestampsSet(ftpState->entry);
+       fwdComplete(ftpState->fwd);
+       ftpSendQuit(ftpState);
+       return;
+    }
     if (ftpState->data.fd >= 0) {
        if (!ftpState->flags.datachannel_hack) {
            /* We are already connected, reuse this connection. */