Article View: news.software.nntp
Article #82660Re: unrelated possible bug with C flag?
From: Julien ÉLIE
Date: Tue, 26 Jan 2010 22:17
Date: Tue, 26 Jan 2010 22:17
74 lines
3957 bytes
3957 bytes
Hi D. Stussy,
> Does NOT recognize "poster" as a reserved word per RFC 5536 where the
> followup count of groups should be ZERO.
>
> --- innd/art.c 2009-01-01 10:02:51.000000000 +0000
> +++ innd/art.c 2010-01-22 00:12:51.000000000 +0000
> @@ -2197,9 +2197,16 @@
> for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; (p = strchr(p, ',')) != NULL ;
> i++, p++)
> continue;
> - data->Followcount = i;
> - }
> - if (data->Followcount == 0)
> + switch(i) {
> + case 1:
> + if (!stricmp(HDR(HDR__FOLLOWUPTO),"poster")) i=0;
What for headers like "news.group,poster"? Do they mean to post the response
to news.group and to the sender by mail?
> I assume that the
> header's data field has had all leading and trailing whitespace stripped.
It cannot be assumed.
I suggest the following patch:
--- art.c (révision 8911)
+++ art.c (copie de travail)
@@ -2159,13 +2159,24 @@
}
if (HDR_FOUND(HDR__FOLLOWUPTO)) {
- for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; (p = strchr(p, ',')) != NULL ;
- i++, p++)
- continue;
+ for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; p != NULL && *p != '\0'; p++) {
+ /* Skip leading whitespaces. */
+ for (; *p && ISWHITE(*p) ; p++)
+ continue;
+
+ /* Do not count "poster". */
+ if (!(strncasecmp(p, "poster", 6) == 0
+ && (p[6] == ',' || p[6] == ' ' || p[6] == '\t'
+ || p[6] == '\r' || p[6] == '\n'))) {
+ i++;
+ }
+ if ((p = strchr(p, ',')) == NULL)
+ break;
+ }
data->Followcount = i;
+ } else {
+ data->Followcount = data->Groupcount;
}
- if (data->Followcount == 0)
- data->Followcount = data->Groupcount;
groups = data->Newsgroups.List;
/* Parse the Control header. */
> I have not addressed any BUG in the for() loop above - are we "off by one"?
> It seems as if we're counting COMMAS, not groups.
Yep! It is fixed in the above patch.
--
Julien ÉLIE
« Le travail n'est pas une bonne chose. Si ça l'était,
les riches l'auraient accaparé. »
Technical Details
Message-ID:
<hjnpm4$f5l$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-29-164.w83-112.abo.wanadoo.fr!not-for-mailReferences:
<hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <hjnpm4$f5l$1@news.trigofacile.com> Subject: Re: unrelated possible bug with C flag? Date: Tue, 26 Jan 2010 23:17:43 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-29-164.w83-112.abo.wanadoo.fr!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 74 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit Injection-Date: Tue, 26 Jan 2010 22:17:40 +0000 (UTC) Injection-Info: news.trigofacile.com; posting-host="aaubervilliers-151-1-29-164.w83-112.abo.wanadoo.fr:83.112.20.164"; logging-data="15541"; mail-complaints-to="abuse@trigofacile.com" In-Reply-To: <hjar9t$mq$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18005 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005