Markus Leutwyler wrote:
> I have attached two logfiles (cache.log .. taken with debug = all,9) that show the different
> behaviour between the small text file and the bigger binary file. The FTP server is
> replying to the SIZE command with "213 0" (0 bytes) and this is sent to the browser as
> Content-length. I just wonder why the text file works and the binary file not. Could
> someone look at the logfile and try to figure out what's going on exactly?
SIZE is only used on binary transfers, not text transfers.
Attached is a small workaround which causes Squid to ignore 0 replies to
SIZE.
/Henrik
Index: squid/src/ftp.c
diff -u squid/src/ftp.c:1.1.1.32.4.1 squid/src/ftp.c:1.1.1.32.4.2
--- squid/src/ftp.c:1.1.1.32.4.1 Wed Apr 21 15:03:39 1999
+++ squid/src/ftp.c Tue May 11 17:59:15 1999
@@ -1577,6 +1577,12 @@
if (code == 213) {
ftpUnhack(ftpState);
ftpState->size = atoi(ftpState->ctrl.last_reply);
+ if (ftpState->size == 0) {
+ debug(9, 2) ("ftpReadSize: SIZE reported %s on %s\n",
+ ftpState->ctrl.last_reply,
+ ftpState->title_url);
+ ftpState->size = -1;
+ }
} else if (code < 0) {
ftpFail(ftpState);
}
Received on Tue May 11 1999 - 11:30:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:15 MST