Article delegate-en/1097 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A1088@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Delegate 7_2_0 and wu-ftp ( using NT4.0 sp6a)
16 Apr 2001 11:58:23 GMT feedback@delegate.org (Yutaka Sato)


Hi,

On 04/12/01(04:00) you Pat Tonra <piacabdyi-n4ll7kbmcnxr.ml@ml.delegate.org> wrote
in <_A1088@delegate-en.ML_>
 |I am currently testing out Delegate v7_2_0 on a Windows NT 4.0 (SP6a) 
 |workstation.  I have setup a HTTP proxy for web browser ftp requests.
 |The command I am using to start the proxy is:
...
 |The proxy works great except when I connect to a FTP server using 
 |wu-ftp, all downloads and directory listings freeze after the file/
 |listing has been completed.  The user has to wait for the inactivity
 |timeout ( default=600 seconds) before the action completes.  I have tested
 |this from Netscape 4.7, IE 5.5, and Opera 5.02, all three show the problem
 |with file downloads.  With IE 5.5 there have been no problems with the directory
 |listing.  
...
 |The ftp server I have been testing against is ftp://mirror.cs.wisc.edu/.

I reproduced this problem with DeleGate/7.2.1 (the latest release)
on Windows95, accessing the server, processing a request generated
and sent by hand.
Thus the problem can be very generic one on Win32, with WU-FTP-2.6.1.


 |By adding "TIMEOUT=io:30" to the configuration the delay is bearable.

I think it is an appropriate solution since the DeleGate is waiting
a response from FTP-server with fgetsTIMEOUT() in ftpgw.c:
>       write(server,"QUIT\n",5);
>       while( fgetsTIMEOUT(buff,sizeof(buff),fsc) != NULL)

Another way I found during debugging is using MASTER-DeleGate as an
upstream DeleGate fo your FTP-DeleGate like:
  % delegated -P8000 RELIABLE=localhost
  % delegated -P2121 SERVER=ftp MASTER=localhost:8000 ...

 |Is there a configuration item I missed or is this a known compatibility issue with
 |wu-ftp?

Something very strange seems to occur in fclose() with Win32;
fclose() to a data-connection does not disconnect work the
data-connection to the Wu-ftp server (!?)
The enclosed patch, which will be applied to the next release
(DeleGate/7.2.2), can make DeleGate escape the problem.

Thank you for your informative notice.

Cheers,
Yutaka
--
  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan


*** ../delegate7.2.1/src/ftpgw.c	Thu Mar 22 19:47:30 2001
--- ftpgw.c	Mon Apr 16 20:51:21 2001
***************
*** 40,45 ****
--- 40,46 ----
  	=> QUIT
  */
  
+ #include <errno.h>
  #include <stdio.h>
  #include "ystring.h"
  extern FILE *ftp_fopen();
***************
*** 827,833 ****
--- 828,845 ----
  		gotok = isdir || !isdir && (size == totalc);
  		sv1log("FTP/HTTP DONE: GOT %d / %d bytes\n",totalc,size);
  	    }
+ {
+ int dfd,rcode;
+ 	dfd = fileno(svdata);
+ 	errno = 0;
+ 	rcode =
  	    fclose(svdata);
+ 	    if( !INHERENT_fork() ){ /* Windows :-p */
+ 		/* fclose() on Win32 does not disconnect with WU-ftpd-2.6.1 */
+ 		Verbose("rcode=%d errno=%d\n",rcode,errno);
+ 		close(dfd);
+ 	    }
+ }
  	}
  
  	write(server,"QUIT\n",5);

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V