classification
Title: nntp_version set to the most recent advertised version
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jelie, pitrou
Priority: normal Keywords:

Created on 2010-11-01 19:53 by jelie, last changed 2010-11-02 22:35 by pitrou. This issue is now closed.

Messages (2)
msg120156 - (view) Author: Julien ÉLIE (jelie) Date: 2010-11-01 19:53
The NNTP version is currently defined as follows in the source code:

self.nntp_version = int(caps['VERSION'][0])

However, Section 3.3.2 of RFC 3977 mentions:

   VERSION
      This capability MUST be advertised by all servers and MUST be the
      first capability in the capability list; it indicates the
      version(s) of NNTP that the server supports.  There must be at
      least one argument; each argument is a decimal number and MUST NOT
      have a leading zero.  Version numbers are assigned only in RFCs
      that update or replace this specification; servers MUST NOT create
      their own version numbers.

There can be more than one version.
See the example in Section 5.2.3:

      [S] VERSION 2 3

I believe the best thing to do would be to take the max of the numbers, that is to say:

self.nntp_version = max(map(int, caps['VERSION']))
msg120271 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-11-02 22:35
I've fixed it according to your suggestion (take the max of the advertised version) in r86129. Thank you!
History
Date User Action Args
2010-11-02 22:35:39pitrousetstatus: open -> closed
resolution: fixed
messages: + msg120271
2010-11-01 20:03:24pitrousetnosy: + pitrou
2010-11-01 19:53:14jeliecreate