Gentoo Archives: gentoo-user

From: Maciej Grela <maciej.grela@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Properly handling missing files when downloading files from ftp:// via ISA proxy (emerge/wget)
Date: Fri, 10 Sep 2010 14:44:14
Message-Id: AANLkTinUsA3b-HutFBxdag_gfSE4cp4bgFu_BeWptuPp@mail.gmail.com
Hi,

Is there any way to make emerge (wget) correctly behave when it tries
to download a non-existing file from FTP
in a network using ISA as ftp_proxy ? I have one of these at work and
it's really annoying because of situations
like below:

pazuzu ~ # LC_ALL=C wget -T 30 -t 1 --continue -O
/var/cache/src/cvsps-2.1.tar.gz
ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/cvsps-2.1.tar.gz
--2010-09-10 16:31:25--
ftp://ftp.gentoo.mesh-solutions.com/gentoo/distfiles/cvsps-2.1.tar.gz
Connecting to 10.144.1.10:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/var/cache/src/cvsps-2.1.tar.gz'

    [ <=>
                                                            ] 318
   --.-K/s   in 0s

2010-09-10 16:31:25 (14.9 MB/s) - `/var/cache/src/cvsps-2.1.tar.gz' saved [318]

Wget thinks, that this file was downloaded when really it contains
some crap produced by ISA:

pazuzu ~ # cat /var/cache/src/cvsps-2.1.tar.gz
<HTML>
<meta http-equiv="Content-Type" content="text-html; charset=UTF-8">
<HEAD>
<TITLE>Server error message </TITLE>
</HEAD>
<BODY><H1>ISA Server: extended error message : </H1>
<PRE>200 Switching to Binary mode.
227 Entering Passive Mode (213,203,218,123,116,42)
550 Failed to open file.
</PRE>
</BODY>
</HTML>
pazuzu ~ #


Is there any way to work around this problem ?
Is it neccessary to change ISA configuration to properly respond to an
ftp client when
the file is missing ? If yes, how ?

Best regards,
Maciej Grela

Replies