Implement LIST HEADERS
This commit is contained in:
parent
f6100c4e2f
commit
613134d63f
1 changed files with 15 additions and 0 deletions
|
@ -406,11 +406,26 @@ class Session():
|
|||
|
||||
return self.end()
|
||||
|
||||
SUPPORTED_HEADERS = [
|
||||
':',
|
||||
':lines',
|
||||
':bytes',
|
||||
]
|
||||
|
||||
def _cmd_list_headers(self):
|
||||
self.respond(ResponseCode.NNTP_INFORMATION_FOLLOWS, "metadata items supported")
|
||||
|
||||
for name in self.SUPPORTED_HEADERS:
|
||||
self.print(name)
|
||||
|
||||
self.end()
|
||||
|
||||
LIST_SUBCOMMANDS = {
|
||||
'NEWSGROUPS': _cmd_list_newsgroups,
|
||||
'ACTIVE': _cmd_list_active,
|
||||
'ACTIVE.TIMES': _cmd_list_active_times,
|
||||
'OVERVIEW.FMT': _cmd_list_overview_fmt,
|
||||
'HEADERS': _cmd_list_headers,
|
||||
}
|
||||
|
||||
def _cmd_list(self, *args):
|
||||
|
|
Loading…
Add table
Reference in a new issue