Return 224 for successful OVER
This commit is contained in:
parent
8e0539059f
commit
d4464f2180
1 changed files with 5 additions and 5 deletions
|
@ -536,7 +536,7 @@ class Session():
|
|||
|
||||
return self.end()
|
||||
|
||||
def _each_message_by_id(self, identifier: str):
|
||||
def _each_message_by_id(self, identifier: str, success: ResponseCode=ResponseCode.NNTP_INFORMATION_FOLLOWS):
|
||||
if identifier is None:
|
||||
if self.newsgroup is None:
|
||||
self.respond(ResponseCode.NNTP_NEWSGROUP_NOT_SELECTED)
|
||||
|
@ -552,7 +552,7 @@ class Session():
|
|||
self.respond(ResponseCode.NNTP_ARTICLE_INVALID_NUMBER)
|
||||
return
|
||||
|
||||
self.respond(ResponseCode.NNTP_INFORMATION_FOLLOWS)
|
||||
self.respond(success)
|
||||
|
||||
yield message
|
||||
elif identifier[0] == '<':
|
||||
|
@ -564,7 +564,7 @@ class Session():
|
|||
self.respond(ResponseCode.NNTP_ARTICLE_NOT_FOUND_ID)
|
||||
return
|
||||
|
||||
self.respond(ResponseCode.NNTP_INFORMATION_FOLLOWS)
|
||||
self.respond(success)
|
||||
|
||||
yield message
|
||||
else:
|
||||
|
@ -584,7 +584,7 @@ class Session():
|
|||
for message in cr.each():
|
||||
if first:
|
||||
first = False
|
||||
self.respond(ResponseCode.NNTP_INFORMATION_FOLLOWS)
|
||||
self.respond(success)
|
||||
|
||||
yield message
|
||||
|
||||
|
@ -690,7 +690,7 @@ class Session():
|
|||
])
|
||||
|
||||
def _cmd_over(self, identifier: Optional[str]=None):
|
||||
for message in self._each_message_by_id(identifier):
|
||||
for message in self._each_message_by_id(identifier, ResponseCode.NNTP_OVERVIEW_FOLLOWS):
|
||||
overview = self._message_overview(message)
|
||||
|
||||
self.print('\t'.join(overview))
|
||||
|
|
Loading…
Add table
Reference in a new issue