This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: nntplib throws spurious NNTPProtocolError
Type: Stage:
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: msapiro
Priority: normal Keywords:

Created on 2019-08-22 17:22 by msapiro, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg350214 - (view) Author: Mark Sapiro (msapiro) * (Python triager) Date: 2019-08-22 17:22
This is really due to an nntp server bug, but here's the scenerio.

A connection is opened to the server.

An article is posted via the connection's post() method.

The server responds to the article data with

240 Article posted <value of message-id>

but due to the server bug, if the message-id is long, this response comes on two lines as

240 Article posted
 <value of message-id>

The post() method reads only the first line and returns it.

Then the connection's quit() method (or some other method) is called, and it sees the second line of the prior response as the server's response rather than the actual response, and raises NNTPProtocolError.

Arguably, NNTPProtocolError is appropriate in this scenario, but if so, it should be raised by the post() method and not by a subsequent method.
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82100
2019-08-22 17:22:32msapirocreate