Fix HDR to be more RFC-compliant

This commit is contained in:
XANTRONIX Development 2024-11-26 13:03:15 -05:00
parent c36c2ebdbd
commit 2084b4c19a

View file

@ -574,11 +574,18 @@ class Session():
cr = self.db.query_sql(Message, sql, (self.newsgroup.id,))
self.respond(ResponseCode.NNTP_HEADERS_FOLLOW)
first = True
for message in cr.each():
if first:
first = False
self.respond(ResponseCode.NNTP_HEADERS_FOLLOW)
self._send_message_header(message, name)
if first:
return self.respond(ResponseCode.NNTP_ARTICLE_NOT_FOUND_RANGE)
return self.end()
def _cmd_stat(self, identifier: Optional[str]=None):