Re: [squid-users] squid bug

From: Robert Collins <robert.collins@dont-contact.us>
Date: 12 Sep 2001 23:27:56 +1000

On Wed, 2001-09-12 at 23:12, Vladimir Ivaschenko wrote:
>
> Ok, my backtrace:

Please try this patch.

Index: ftp.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/ftp.c,v
retrieving revision 1.298.2.4
diff -u -p -r1.298.2.4 ftp.c
--- ftp.c 2001/01/12 00:51:47 1.298.2.4
+++ ftp.c 2001/09/12 13:27:01
@@ -2438,10 +2438,17 @@ ftpSendReply(FtpStateData * ftpState)
     } else if (code == 227) {
         err_code = ERR_FTP_PUT_CREATED;
         http_code = HTTP_CREATED;
+ } else if (httpHeaderGetInt(&ftpState->request->header,
HDR_CONTENT_LENGTH) == 0) {
+ err_code = ERR_ZERO_SIZE_OBJECT;
+ http_code = HTTP_NO_CONTENT;
     } else {
         err_code = ERR_FTP_PUT_ERROR;
         http_code = HTTP_INTERNAL_SERVER_ERROR;
     }
+ if (!ftpState->ctrl.last_command)
+ ftpState->ctrl.last_command = "";
+ if (!ftpState->ctrl.last_reply);
+ ftpState->ctrl.last_reply = "":
     err = errorCon(err_code, http_code);
     err->request = requestLink(ftpState->request);
     if (ftpState->old_request)

Rob
Received on Wed Sep 12 2001 - 07:27:22 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:09 MST