srnd: use some of headers from outer message

This commit is contained in:
cathugger
2019-01-27 14:42:35 +02:00
parent e230c75c9b
commit 8fd1f4a30f
2 changed files with 13 additions and 6 deletions
+8 -1
View File
@@ -700,7 +700,14 @@ func read_message_body(body io.Reader, hdr map[string][]string, store ArticleSto
}
// process inner body
// verify message
f := func(h map[string][]string, innerBody io.Reader) {
f := func(h ArticleHeaders, innerBody io.Reader) {
// override some of headers of inner message
msgid := nntp.MessageID()
if msgid != "" {
h.Set("Message-Id", msgid)
}
h.Set("Path", nntp.headers.Get("Path", ""))
h.Set("X-Pubkey-Ed25519", pk)
// handle inner message
e := read_message_body(innerBody, h, store, nil, true, callback)
if e != nil {