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

[DeleGate-En] Re: NNTP-Delegate will not cache in Linux
07 Aug 2008 10:34:01 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

In message <_A4055@delegate-en.ML_> on 08/07/08(18:48:12)
you Jeff <pyqhqbdyi-lnxhrzqrwznr.ml@ml.delegate.org> wrote:
 |I have been testing the last patch you sent, it seems to work acceptably but
 |I have noticed an interesting side effect.
 |
 |First off, let me explain briefly how I am testing. My setup has an
 |NNTP-delegate proxy serving the content from a Newsfeed provider. My local
 |cache (Linux server doing the caching) connects to this main proxy.
 |
 |Newsfeed provider -> Remote-Proxy -> {traffic shaper} -> Local-Cache ->
 |Requesting-User
 |
 |The side effect that I am seeing is that the Local-Cache waits for the
 |article to download completely to the cache before sending it on to the
 |Requesting-User. So a traffic graph on the user side on the local network
 |will see traffic spikes. Normally, the data should be "teed" or split so it
 |is simultaneously written to cache and sent over the network. This seems to

I'm sure that the tentative patch was coded behave as you described :p
It receives ARTICLE response from the server to a cache file, then
BODY part is extracted and forwarded to the client.
It'll be modified as the following patch to "tee" the response data
both to the cache file and the client.

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.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

*** dist/src/delegate9.8.4-pre4preC/src/nntp.c	Tue Aug  5 19:54:07 2008
--- src/nntp.c	Thu Aug  7 19:23:34 2008
***************
*** 3723,3734 ****
  		strsubst(AVStr(line)," ARTICLE\r\n"," BODY\r\n");
  		sv1log("##BA resp >>> %s",line);
  		fputs(line,tc);
! 		RFC821_skipbody(fs,cache,AVStr(line),sizeof(line));
! 		fflush(cache);
! 		fseek(cache,0,0);
! 		RFC821_skipheader(cache,NULL,NULL);
! 		decodeBODY(cache,tc,filter,NULL,NULL,enHTML);
! 		fputs(line,tc); /* EOR */
  	}else
  	switch( decoding ){
  	case D_THRU: thruRESP(fs,tc); break;
--- 3723,3730 ----
  		strsubst(AVStr(line)," ARTICLE\r\n"," BODY\r\n");
  		sv1log("##BA resp >>> %s",line);
  		fputs(line,tc);
! 		filter = (4|8); /* body part and EOR only to the client */
! 		PGPdecodeMIME(fs,tc,cache,filter,1,enHTML);
  	}else
  	switch( decoding ){
  	case D_THRU: thruRESP(fs,tc); break;

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