Re: NNTPC: problem with "HEAD" followed by "BODY" requests on non-cached articles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks!  That got me headed in the right direction.

Here's the really trivial change I ended up with.  I've no idea if there
are any side effects to this, but it definitely _looks_ like the right
thing to do and seems to work for all cases I've tried:

Heather

--- article.c.orig	Mon Jul 17 16:44:27 2000
+++ article.c	Tue Jul 18 15:31:22 2000
@@ -452,6 +452,7 @@
 	struct strStack *art_stack = NULL;
 	bool getbyid;
 	bool f_filt = con->contentFilters && CurrentGroupAuth && CurrentGroupAuth->filter_chain;
+	int head_len=0; 
 
 	strStripLeftRight (args);
 	if (strSnip(args, 0, "<", ">\r\n", msgid, sizeof msgid)<1 &&
@@ -569,6 +570,8 @@
 								if (munmap(buf, len)!=0)
 									loge (("couldn't munmap %s (%d length)", artfile, len));
 								logd (("fetched %s (%d bytes) from cache", artfile, len));
+								head_len=len;	
+			
 							}
 						} else /* fstat failed */
 							lockun (fd);
@@ -619,7 +622,7 @@
 	if (fd<0)		/* cache off or request not in cache */
 	{
 		bool body;
-		int head_len=0; /* stop warning */
+
 		if ((!Cget (bfr, sizeof bfr) ||
 		     !(response=strToi (bfr))) || 
 		    (response != NNTP_ARTICLE_FOLLOWS_VAL &&





[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux