Fix HDR to be more RFC-compliant
This commit is contained in:
parent
c36c2ebdbd
commit
2084b4c19a
1 changed files with 8 additions and 1 deletions
|
@ -574,11 +574,18 @@ class Session():
|
||||||
|
|
||||||
cr = self.db.query_sql(Message, sql, (self.newsgroup.id,))
|
cr = self.db.query_sql(Message, sql, (self.newsgroup.id,))
|
||||||
|
|
||||||
self.respond(ResponseCode.NNTP_HEADERS_FOLLOW)
|
first = True
|
||||||
|
|
||||||
for message in cr.each():
|
for message in cr.each():
|
||||||
|
if first:
|
||||||
|
first = False
|
||||||
|
self.respond(ResponseCode.NNTP_HEADERS_FOLLOW)
|
||||||
|
|
||||||
self._send_message_header(message, name)
|
self._send_message_header(message, name)
|
||||||
|
|
||||||
|
if first:
|
||||||
|
return self.respond(ResponseCode.NNTP_ARTICLE_NOT_FOUND_RANGE)
|
||||||
|
|
||||||
return self.end()
|
return self.end()
|
||||||
|
|
||||||
def _cmd_stat(self, identifier: Optional[str]=None):
|
def _cmd_stat(self, identifier: Optional[str]=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue