Article delegate-en <_A3752@delegate-en.ML_>
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[delegate-en/3752] [Reference:<_A3750@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: ftp sftp get problem
07 Jun 2007 03:55:17 GMT (Yutaka Sato)
The DeleGate Project


In message <_A3750@delegate-en.ML_> on 06/04/07(22:12:09)
you "Nuellmann, Thorsten" <> wrote:
 |Hi, I have a delegate server running and try to use the ftp/sftp
 |gateway. It works, I can put files bigger 500MB no problem
 |Now I will get files from sftp server, I can only get files less 32786,
 |which is the same size as the buffersize. Any idea thanks for reply

The current (tentative) SFTP/FTP gateway of DeleGate is implemented based
on the "sftp" command so the behavior of it depends on the implementation
and specification of the sftp command and the pty device on each platform.

Especially it is not recommended to upload a large file via the SFTP/FTP
gateway because it makes a temporary file of the copy of the transfered
data on the local disk, becuase the (resent) sftp command is implemented
to require the target file of downloaded data to be "seekable".

But anyway the problem you saw should be fixed and the modification will
be as the enclosed patch.

  9 9   Yutaka Sato <>
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

*** ../../delegate9.6.1-pre5/src/sftp.c	Tue May 29 11:30:54 2007
--- sftp.c	Thu Jun  7 11:44:44 2007
*** 270,276 ****
--- 270,286 ----
  			if( 0 < rv[0] ){
+ 				IStr(res,1024);
+ 				/*
+ 				*/
+ 				relay_resp(fs,-1,1,AVStr(res),com,1);
+ 				if( !strcasestr(res,"sftp>") && res[0] != 0 ){
+ 					/* 9.6.1 not the prompt implying fin. */
+ 					if( strtailchr(res) != '\n' )
+ 						strcat(res,"\n");
+ 					DEBUG("--SFTP relay: %s",res);
+ 				}else
  				unlink(fifo); /* notify recv. completion */
  				DEBUG("--SFTP recv. seems complete\n");

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