Archived
1
0
This commit is contained in:
Jeff Becker 2017-11-06 18:32:39 -05:00
parent bf357a3461
commit e7c6100691
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -549,19 +549,14 @@ func getGroupForCatalog(file string) (group string) {
// get a message id from a mime header // get a message id from a mime header
// checks many values // checks many values
func getMessageID(h map[string][]string) (msgid string) { func getMessageID(h map[string][]string) string {
hdr := textproto.MIMEHeader(h) for k := range h {
msgid = hdr.Get("Message-Id") kl := strings.ToLower(k)
if msgid == "" { if kl == "message-id" || kl == "messageid" {
msgid = hdr.Get("Message-ID") return h[k][0]
} }
if msgid == "" {
msgid = hdr.Get("message-id")
} }
if msgid == "" { return ""
msgid = hdr.Get("MESSAGE-ID")
}
return
} }
func getMessageIDFromArticleHeaders(hdr ArticleHeaders) (msgid string) { func getMessageIDFromArticleHeaders(hdr ArticleHeaders) (msgid string) {