On Wed, Apr 07, 2004 at 12:54:09PM +0200, Stefan Huettmann wrote:
> it looks better with your settings!
> I can see the connection from the proxy to the higher port of the ftp-server
> but then the connection brokes with the following message:
>
> lftp: ftpclass.cc:3201: virtual int Ftp::Read(void*, int): Assertion
> `rate_limit!=0' failed.
Please try this patch. The bug only happens when accessing an ftp server
via http proxy with CONNECT method.
--
Alexander.
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.308
diff -u -p -r1.308 ftpclass.cc
--- ftpclass.cc 6 Apr 2004 07:10:21 -0000 1.308
+++ ftpclass.cc 7 Apr 2004 05:38:24 -0000
@@ -1264,7 +1264,7 @@ int Ftp::Do()
conn->SavePeerAddress();
#ifdef USE_SSL
- if(proxy?!strcmp(proxy_proto,"ftps")||!strcmp(proxy_proto,"https"):ftps)
+ if(proxy?!xstrcmp(proxy_proto,"ftps")||!xstrcmp(proxy_proto,"https"):ftps)
{
conn->MakeSSLBuffers(hostname);
conn->prot='P';
@@ -3178,6 +3178,9 @@ int Ftp::Read(void *buf,int size)
return DO_AGAIN;
if(expect->Has(Expect::REST) && real_pos==-1)
+ return DO_AGAIN;
+
+ if(state==DATASOCKET_CONNECTING_STATE)
return DO_AGAIN;
if(state==DATA_OPEN_STATE)