Send other headers in response to OVER
This commit is contained in:
parent
c124725e0c
commit
0e55d3e86a
1 changed files with 12 additions and 2 deletions
|
@ -680,7 +680,10 @@ class Session():
|
|||
self._send_message_header(message, name)
|
||||
|
||||
def _message_overview(self, message: Message) -> dict:
|
||||
return map(lambda s: s.replace('\t', ' '), [
|
||||
def f(s: str):
|
||||
return s.replace('\t', ' ').replace('\r', '').replace('\n', ' ').replace('\0', '')
|
||||
|
||||
parts = [
|
||||
str(message.id),
|
||||
email.header.Header(message.subject).encode(),
|
||||
email.header.Header(message.sender).encode(),
|
||||
|
@ -689,7 +692,14 @@ class Session():
|
|||
message.parent_id or '',
|
||||
str(len(message.content)),
|
||||
str(message.content.count('\n') + 1),
|
||||
])
|
||||
]
|
||||
|
||||
for k in message.headers:
|
||||
parts.append("%s: %s" % (
|
||||
k, message.headers[k]
|
||||
))
|
||||
|
||||
return map(f, parts)
|
||||
|
||||
def _cmd_over(self, identifier: Optional[str]=None):
|
||||
for message in self._each_message_by_id(identifier, ResponseCode.NNTP_OVERVIEW_FOLLOWS):
|
||||
|
|
Loading…
Add table
Reference in a new issue