🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #66976

Re: New NNTP draft -- Section 8

#66976
From: Andrew - Supernews
Date: Mon, 27 Oct 2003 10:54
168 lines
7865 bytes
In article <87r80ze9fq.fsf@windlord.stanford.edu>, Russ Allbery wrote:
> 8.4.1 The :bytes metadata item
> 
>    The :bytes metadata item for an article is a decimal integer. It MUST
>    equal the number of octets in the entire article - headers, body, and
>    separating empty line - except that each CRLF pair MAY (but SHOULD
>    NOT) be counted as a single octet.

shouldn't there be an explicit comment in here about accuracy (or rather
the lack thereof)? While it's semi-implied by the ambiguity over CRLF, it
should be explicitly stated somewhere.

Something like:

    The :bytes metadata item for an article is a decimal integer
    representing the number of octets in the entire article - headers, body,
    and separating empty line.

    The :bytes value may differ from the actual number of octets returned
    in response to an ARTICLE command (and, moreover, the number of octets
    returned by ARTICLE may in some cases vary between calls. Accordingly
    clients MUST NOT rely on the accuracy of this value. The following
    variations may be observed:

      - the :bytes value may (but SHOULD NOT) count CRLF pairs as a single
        octet (this provision is only intended for historical compatibility,
        servers SHOULD treat CRLF pairs as two octets)

      - the :bytes value MAY (or may not) include inserted dot-stuffing '.'
        octets, and MAY (or may not) include the final '.' CRLF response
        terminator

      - the server may have at its disposal multiple copies of an article
        which vary in ways permitted according to the applicable article
        format specification. The :bytes value may have been taken from a
        different copy of the article to the one actually returned.

> 8.5 The OVER extension
> 
>    This extension provides two commands, OVER and LIST OVERVIEW.FMT. The
>    label for this extension is OVER.
> 
>    The OVER extension provides access to the "overview database", which
>    is a database of headers extracted from incoming articles. Only
>    certain headers are included in the database. The database also
>    includes some article metadata. The information stored in the
>    database may change over time. If the database records the content or
>    absence of a given field (that is, a header or metadata item) for all
>    articles, it is said to be "consistent" for that field. If it records
>    the content of a header for some articles but not for others that
>    nevertheless included that header, or records a metadata item for
>    some articles but not others to which that item applies, it is said
>    to be "inconsistent" for that field.
> 
>    The LIST OVERVIEW.FMT command SHOULD list all the fields for which
>    the database is consistent at that moment. It MAY omit such fields
>    (for example if it is not known whether the database is consistent or
>    inconsistent). It MUST NOT include fields for which the database is
>    inconsistent or which are not stored in the database. Therefore if a
>    header appears in the LIST OVERVIEW.FMT output but not the OVER
>    output for a given article, that header does not appear in the
>    article, and similarly for metadata items.

We presently return a fixed response for LIST OVERVIEW.FMT, listing only the
7 standard fields and Xref:full. All these fields are, given the server
design, "consistent" (as defined above).

Although our "overview database" stores other values too, we do not return
them in response to OVER (or XOVER) commands. This is mainly to avoid
bloating the amount of data transferred with information that only a small
subset of clients want to see.

> 8.5.1 OVER
> 
> 8.5.1.1 Usage
> 
>    Syntax
>       OVER message-id

When did this creep back in?

Essentially every major server design in use treats the overview database as
an article index by group, and has no way to retrieve precomputed overview
entries by message-id. The obvious approach of implementing (in the server)
the equivalent of HEAD <id> plus conversion to overview format fails badly
on some server designs where the Xref: field is not accessible in such cases.

Needless to say we don't support it (and never will; the solution for
NEWNEWS-type clients is to provide an extension to NEWNEWS itself that
returns additional requested overview fields _along with_ the message-ids;
this can be done efficiently, whereas handling a huge stream of OVER <id>
requests from a client can not).

> 8.6 The HDR extension
> 
>    This extension provides two new commands: HDR and LIST HEADERS. The
>    label for this extension is HDR.

we don't support LIST HEADERS yet, but it's trivial enough to fix that.

> 8.6.1 HDR
> 
> 8.6.1.1 Usage
> 
>    Syntax
>       HDR header message-id

Some existing designs won't be able to support HDR Xref <id> without rather
extreme contortions in the server (see comments for OVER <id>). Also,
HDR :lines <id> may be problematic.

> 8.6.2 LIST HEADERS
> 
> 8.6.2.1 Usage
> 
>    Syntax
>       LIST HEADERS
> 
>    Responses
>       215   Header and metadata list follows (multiline)
> 
> 8.6.2.2 Description
> 
>    The LIST HEADERS command returns a list of headers and metadata items
>    that may be retrieved using the HDR command.
> 
>    The information is returned as a multi-line response following the
>    215 response code and contains one line for each header or metadata
>    item name (excluding the colon in the former case). If the
>    implementation allows any header to be retrieved (also indicated by
>    the "ALL" argument to the extension label) it MUST NOT include any
>    header names in the list but MUST include the special entry ":" (a
>    single colon on its own); it MUST still list any metadata items that
>    are available. The order of items in the list is not significant; the
>    server need not even consistently return the same order. The list MAY
>    be empty (though in this circumstance there is little point in
>    providing the extension).
> 
>    An implementation that also supports the OVER extension SHOULD at
>    least permit all the headers and metadata items listed in the output
>    from the LIST OVERVIEW.FMT command.

ok. So if I'm reading this right, our server should return something like
this for LIST HEADERS:

215 list follows
Subject
From
Date
Message-ID
References
Xref
Followup-To
Content-Type
Content-Transfer-Encoding
NNTP-Posting-Host
X-Trace
:bytes
:lines
..

(In future we are likely to move to supporting all headers, but that's
contingent on a number of changes to the way the data is stored to avoid
serious problems with overhead on the common OVER case.)

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID: <slrnbppubi.2ofh.andrew+nonews@trinity.supernews.net>
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!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!feed3.news.rcn.net!feed2.news.rcn.net!rcn!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <87r80ze9fq.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <slrnbppubi.2ofh.andrew+nonews@trinity.supernews.net>
Subject: Re: New NNTP draft -- Section 8
Date: Mon, 27 Oct 2003 10:54:43 -0000
From: Andrew - Supernews <andrew+nonews@supernews.com>
References: <87r80ze9fq.fsf@windlord.stanford.edu>
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!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!feed3.news.rcn.net!feed2.news.rcn.net!rcn!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.nntp
Organization: http://www.supernews.com - all your nntp are belong to us
Reply-To: andrew@supernews.com
User-Agent: slrn/0.9.7.4 (FreeBSD)
X-Complaints-To: abuse@supernews.com
Lines: 168