Article delegate-en/2380 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:<_A2379@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Cache does not hit
26 Aug 2003 06:39:55 GMT feedback@delegate.org (Yutaka Sato)


Hi,

On 08/20/03(19:58) you Torsten Schlabach <piueqbdyi-kp76qhqnkelr.ml@ml.delegate.org> wrote
in <_A2379@delegate-en.ML_>
 |** 2nd attempt; you mail server rejected my mail because of the 266K
 |attachment **

Sorry for the inconvenience...
I picked up your original message including LOGFILE from the rejected spool.

 |>> Could you show me the LOGFILE of your DeleGate?  
 |>> There might be a line which shows the reason why the cached file is not
 |reused.
 |
 |Sure. I have downloaded dg8_6_3-snap03081906.zip and tried again with this
 |one. Same problem. I will attach the file to this e-mail. Maybe you will
 |find out.

From your LOGFILE, I found that your command sequence is like this: 

08/20 10:35:01.10 [302] 2+0: CLIENT-SAYS: USER anonymous^M
08/20 10:35:01.10 [302] 2+0: CLIENT-SAYS: PASS root@^M
08/20 10:35:01.10 [302] 2+0: CLIENT-SAYS: TYPE I^M
08/20 10:35:01.10 [302] 2+0: CLIENT-SAYS: PASV^M
08/20 10:35:01.10 [302] 2+0: CLIENT-SAYS: RETR /pub/linux/distributions/suse/8.2/boot/root^M

DeleGate has not supported reading cache on such case where no CWD to
somewhere in real-server is done before RETR.

 |You may also want to have a look at the end of the log file. It shown an
 |attempt to so a SIZE on some files that fails because of some URL rewriting
 |problem.

It is because you are specifying the protocol name in uppercase letters.

08/20 10:34:41.09 [280] 0+0: arg[3] SERVER=FTP
08/20 10:34:41.09 [280] 0+0: arg[5] MOUNT=/* //localhost:2121/*

Specifying like SERVER="ftp" or MOUNT="/* ftp://localhost:2121/*" will 
solve the problem.

Anyway, I coped with these problems like an enclosed patch.


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
Do the more with the less -- B. Fuller

*** ../dist/delegate8.6.3-snap03082507/src/ftp.c	Sun Aug 24 17:54:23 2003
--- ftp.c	Tue Aug 26 15:28:18 2003
***************
*** 162,171 ****
--- 162,177 ----
  	char	fs_qcTYPE[32];	/* TYPE request argument cache */
  	char   *fs_rcTYPE;	/* TYPE response line cache */
  
+ 	AuthInfo fs_Ident; /* replaces fs_USER, fs_host and fs_port */
+ 
  	FILE   *fs_ts;
  	FILE   *fs_fs;
  } FtpStat;
  
+ #define fs_USER	fs_Ident.i_user
+ #define fs_host	fs_Ident.i_Host
+ #define fs_port	fs_Ident.i_Port
+ 
  #define FS_NOAUTH	2 /* password authentication unnecessary */
  
  #define fs_XDCforSV	fs_XDC_SV.xdc_ON
***************
*** 1016,1021 ****
--- 1022,1029 ----
  	sprintf(xserv,"%s/%s",site,path);
  	sv1log("MOUNTED REMOTE [%s@%s:%d] %s %s\n",
  		ident.i_user,ident.i_Host,ident.i_Port,com,path);
+ 
+ 	FS->fs_Ident = ident;
  	return 1;
  }
  
***************
*** 1714,1720 ****
--- 1722,1731 ----
  		goto EXIT;
  	}
  
+ 	/*
  	if( strncmp(mdir,"ftp://",6) == 0 ){
+ 	*/
+ 	if( strncasecmp(mdir,"ftp://",6) == 0 ){
  		strcpy(arg,mdir+4);
  		if( req != NULL )
  			sprintf(req,"CWD %s\r\n",arg);
***************
*** 2148,2158 ****
--- 2159,2179 ----
  		}
  
  		if( PATHCOMS(com) ){
+ 			int hit;
+ 			AuthInfo sident = FS->fs_Ident;
  			if( swRemote(FS,com,arg,cserv,NULL) ){
  				/* options like "-l" for LIST must be forwarded too... */
  				if( *arg == '-' ){
  					wordScan(arg,FS->fs_opts);
  				}
+ 
+ 				hit = RETRCOMS(com)
+ 				 && lookaside_cache(Conn,FS,tc,com,arg,1);
+ 				FS->fs_Ident = sident;
+ 				if( hit ){
+ 					continue;
+ 				}
+ 
  				change_server(Conn,FS,fc,tc,com,cserv,
  					cuser,cpass,FS->fs_TYPE);
  				cserv[0] = 0;

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