Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A triangle which has an angle of 135 degrees is called an obscene triangle.


computers / news.software.nntp / RFC3977: understanding "last" and "next"

SubjectAuthor
* RFC3977: understanding "last" and "next"Matto Fransen
+* Re: RFC3977: understanding "last" and "next"Julien ÉLIE
|`- Re: RFC3977: understanding "last" and "next"Matto Fransen
`- Re: RFC3977: understanding "last" and "next"Jesse Rehmer

1
RFC3977: understanding "last" and "next"

<86k00yv831.fsf@sdf.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1383&group=news.software.nntp#1383

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mattof@sdf.org (Matto Fransen)
Newsgroups: news.software.nntp
Subject: RFC3977: understanding "last" and "next"
Date: Fri, 03 Feb 2023 20:53:54 +0100
Lines: 74
Message-ID: <86k00yv831.fsf@sdf.org>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net CTHlRiUEX+cDY4jCnTi8BQfLZYScyCmRUR0SroUZyP4FbdkSG1
Cancel-Lock: sha1:iaWBtP6p1C2fQVMBNyhNqRYeLT0= sha1:+z2TSHKzi+mibux+JRHHKhN6NQs=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Matto Fransen - Fri, 3 Feb 2023 19:53 UTC

Hi,

Reading https://www.rfc-editor.org/rfc/rfc3977.html, I have some
questions understanding "last" and "next".

This is what the RFC says about "last":

If the currently selected newsgroup is valid, the current article
number MUST be set to the previous article in that newsgroup (that
is, the highest existing article number less than the current article
number). If successful, a response indicating the new current
article number and the message-id of that article MUST be returned.
No article text is sent in response to this command.

and the RFC gives some examples:
( [C] = client, [S] = server)

[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] NEXT
[S] 223 3000237 <668929@example.org> retrieved
[C] LAST
[S] 223 3000234 <45223423@example.com> retrieved

and:

[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] LAST
[S] 422 No previous article to retrieve

From the first example, I get the impression that, when the client
asked "next", the article 3000237 was the first above 300234, hence
the server responded with the number and message-ID of this article.

When the client then asked "last", the server looked at what the
very first article is below 3000237, and comes with 3000234.
- Is this correct?
- Does this mean that the server must keep state, that is,
remembering that it answered 3000237 on a previous command?

This is what the RFC says about "next":

If the currently selected newsgroup is valid, the current article
number MUST be set to the next article in that newsgroup (that is,
the lowest existing article number greater than the current article
number). If successful, a response indicating the new current
article number and the message-id of that article MUST be returned.
No article text is sent in response to this command.

and an example:

[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
[C] NEXT
[S] 223 3000237 <668929@example.org> retrieved

From the text I understand that there is something like a "current
article", and when looking at the example, the default "current article"
is the article with the lowest number that is available. Is this
correct?

When I read chapter 6.2.1. ARTICLE, I don't see anything about
updating what the "current article" is. From this, I get the impression
that only "last" and "next" infuence what must be seen as the
"current article". Is this correct?

Any light on these points is very much appreciated!

(I hope that this is the right group for these questions)

Best regards,

Matto

Re: RFC3977: understanding "last" and "next"

<trjpor$j087$1@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1385&group=news.software.nntp#1385

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.176.143-2-105.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: RFC3977: understanding "last" and "next"
Date: Fri, 3 Feb 2023 21:11:06 +0100
Organization: Groupes francophones par TrigoFACILE
Message-ID: <trjpor$j087$1@news.trigofacile.com>
References: <86k00yv831.fsf@sdf.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 3 Feb 2023 20:11:07 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105";
logging-data="622855"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Cancel-Lock: sha1:zcBXMJvKjHzv0saXkbbjHjjgMDc= sha256:FSde+0yX47syfKtJl1AawcIWvNqvfQE+6uIJT/ynNJk=
sha1:wq+75Yopr0644etlVr/R6AIaavQ= sha256:Uq9ati9lmZosN74a3PF7PAVVJuek8BRYejW/X3Uq3o0=
In-Reply-To: <86k00yv831.fsf@sdf.org>
 by: Julien ÉLIE - Fri, 3 Feb 2023 20:11 UTC

Hi Matto,

> [C] GROUP misc.test
> [S] 211 1234 3000234 3002322 misc.test
> [C] NEXT
> [S] 223 3000237 <668929@example.org> retrieved
> [C] LAST
> [S] 223 3000234 <45223423@example.com> retrieved
>
> From the first example, I get the impression that, when the client
> asked "next", the article 3000237 was the first above 300234, hence
> the server responded with the number and message-ID of this article.
>
> When the client then asked "last", the server looked at what the
> very first article is below 3000237, and comes with 3000234.
> - Is this correct?

Exactly.

> - Does this mean that the server must keep state, that is,
> remembering that it answered 3000237 on a previous command?

Indeed, that's the notion of "current article number".
When answering to NEXT, LAST and other commands returning article
numbers, the current article number is updated to reflect the latest
article number that has been selected via the use of the command.
The news server keeps that information during the NNTP session (as well
as the currently selected newsgroup, the rights of the user, etc.).

> From the text I understand that there is something like a "current
> article", and when looking at the example, the default "current article"
> is the article with the lowest number that is available. Is this
> correct?

Yes:

6.1. Group and Article Selection

The following commands are used to set the "currently selected
newsgroup" and the "current article number", which are used by
various commands. At the start of an NNTP session, both of these
values are set to the special value "invalid".

> When I read chapter 6.2.1. ARTICLE, I don't see anything about
> updating what the "current article" is. From this, I get the impression
> that only "last" and "next" infuence what must be seen as the
> "current article". Is this correct?

6.2.1. ARTICLE

Second form (article number specified)
220 n message-id Article follows (multi-line)
412 No newsgroup selected
423 No article with that number

6.2.1.2. Description

In the second form, an article number is specified. If there is an
article with that number in the currently selected newsgroup, the
server MUST set the current article number to that number.

> Any light on these points is very much appreciated!
> (I hope that this is the right group for these questions)

You're welcome.

--
Julien ÉLIE

« – Ce n'était pas ma question.
– C'était p'têt pas vot'question, oui, mais c'est ma réponse ! »
(Georges Marchais répondant à Alain Duhamel)

Re: RFC3977: understanding "last" and "next"

<trjqvv$1c02$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1387&group=news.software.nntp#1387

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: RFC3977: understanding "last" and "next"
Date: Fri, 3 Feb 2023 20:31:59 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <trjqvv$1c02$1@nnrp.usenet.blueworldhosting.com>
References: <86k00yv831.fsf@sdf.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 3 Feb 2023 20:31:59 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="45058"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:Hz3QTIdYE3CR7f+xKHfqbxqrKWs= sha256:Hy4Pnj+r4qV7I6paQ9QA90mXfOvKzVi3Jf7IBkW8pgs=
sha1:w8MQ9PSldhiJhsHGk4gbG+1FEaU= sha256:C/B6inx1Pji6tc6/j6GP/bJfvoXvW/GlACNbTfRqSMU=
X-Usenapp: v1.26/d - Full License
 by: Jesse Rehmer - Fri, 3 Feb 2023 20:31 UTC

On Feb 3, 2023 at 1:53:54 PM CST, "Matto Fransen" <mattof@sdf.org> wrote:

> (I hope that this is the right group for these questions)
>
> Best regards,
>
> Matto

This is definitely *the best* place to ask any NNTP protocol related
questions.

I cannot express how invaluable the assistance from folks like Russ, Julien,
and others have been to me over the years.

Re: RFC3977: understanding "last" and "next"

<86edr6v2w7.fsf@sdf.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1389&group=news.software.nntp#1389

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: mattof@sdf.org (Matto Fransen)
Newsgroups: news.software.nntp
Subject: Re: RFC3977: understanding "last" and "next"
Date: Fri, 03 Feb 2023 22:46:00 +0100
Lines: 21
Message-ID: <86edr6v2w7.fsf@sdf.org>
References: <86k00yv831.fsf@sdf.org> <trjpor$j087$1@news.trigofacile.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net dKV/PZSpVOgx9HAAXILx4QXrJ9MoS+QoNLIoOU+9BZsgKCW+g4
Cancel-Lock: sha1:HvEa7MTX2+HYYuAc3UvcLI/FoTI= sha1:F6X1QbwYx1/QgKCG8kHILkJLyPo=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
 by: Matto Fransen - Fri, 3 Feb 2023 21:46 UTC

On 3 February 2023 21:11 Julien ÉLIE, wrote:

>> very first article is below 3000237, and comes with 3000234.
>> - Is this correct?
>
> Exactly.
>

8< ---

>
>> Any light on these points is very much appreciated!
>> (I hope that this is the right group for these questions)
>
> You're welcome.

Thank you for your kind reply, it was very helpful !

Best regards,

Matto

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor