Add response header for ARTICLE

This commit is contained in:
ChronosX88 2022-04-15 02:21:50 +03:00
parent f868fb8876
commit f65363ccf8
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A

View File

@ -514,6 +514,7 @@ func (h *Handler) handleArticle(s *Session, command string, arguments []string,
{
dw := s.tconn.DotWriter()
builder := utils.Builder()
_, err = dw.Write([]byte(protocol.NNTPResponse{Code: 220, Message: fmt.Sprintf("%d %s article", num, a.Header.Get("Message-ID"))}.String() + protocol.CRLF))
for k, v := range a.Header {
for _, j := range v {
builder = builder.Header(k, j)