🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #70131

Re: truncated newsgroups header

#70131
From: Jeffrey M. Vinocur
Date: Thu, 14 Oct 2004 13:31
57 lines
3246 bytes
In article <cklo77$79u$1@e250.ripco.com>, J. Rappe <jrappe@gmx.net> wrote:
>We're running INN for a small server that carries mostly internal
>groups and a handful of public groups that users have requested.
>The problem we have is that clients that use xhdr to to grab the
>Newsgroups header get a truncated version apparently constructed
>from Xref.  Is there some configuration option that would cause
>the server to return the full header?

Wow, I'd never seen that behavior mentioned before.  You are,
however, absolutely correct.  The reason INN does this is that
Newsgroups is not stored in the overview database, and so there's
quite a bit of overhead to returning the correct Newsgroups
header.

However, in a small server, I expect this wouldn't be a problem.
There is no configuration option, but it's a very small patch to
nnrpd.  I haven't tested this, but I'm pretty confident it will
work.

The file you need to change is nnrpd/article.c, in the function
CMDpat(), there's a block of code like this:

        /* In overview? */
        if (strcasecmp(header, "Newsgroups") == 0) {
            BuildingNewsgroups = true;
            Overview = overview_index("Xref", OVextra);
        } else
            Overview = overview_index(header, OVextra);


That's the special casing for the reason I described above.  So
simply comment out the special case:

        /* In overview? */
        /* disable effecient-but-incorrect "XHDR Newsgroups" behavior:
        if (strcasecmp(header, "Newsgroups") == 0) {
            BuildingNewsgroups = true;
            Overview = overview_index("Xref", OVextra);
        } else
        */
            Overview = overview_index(header, OVextra);


Then recompile and you should be fine.  (There are a couple other
bits of code that now become useless, but a decent compiler
should take care of removing them for you so I wouldn't worry
about it.)


It would be pretty easy to add a configuration option for this,
even to make it customizable in various ways, but I don't know
how often people need this feature.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <cklv3f$tvh$1@puck.litech.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.20140818.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!news.litech.org!not-for-mail
References: <cklo77$79u$1@e250.ripco.com>

Show Full Headers
Complete Article Headers
Message-ID: <cklv3f$tvh$1@puck.litech.org>
Subject: Re: truncated newsgroups header
Date: Thu, 14 Oct 2004 13:31:27 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <cklo77$79u$1@e250.ripco.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.20140818.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!internal1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur1.glorb.com!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 57
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1097760687 30705 66.218.0.75 (14 Oct 2004 13:31:27
 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Thu, 14 Oct 2004 13:31:27 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)