commit | 7835eb00614f0603aa73df056e8597c16b53005d | [log] [tgz] |
---|---|---|
author | Kevin Chen <kevinmichaelchen@gmail.com> | Wed May 02 20:58:58 2018 -0400 |
committer | Kevin Chen <kevinmichaelchen@gmail.com> | Wed May 02 20:58:58 2018 -0400 |
tree | 06f349a27151f9f7da178e7bba991d979fb912e4 | |
parent | f4376a629efd9d465415cc2016bd2564f74a1494 [diff] |
Case insensitive check for Content-Transfer-Encoding
diff --git a/parsemail.go b/parsemail.go index 6ee0624..8a62e26 100644 --- a/parsemail.go +++ b/parsemail.go
@@ -232,7 +232,7 @@ func decodePartData(part *multipart.Part) (io.Reader, error) { encoding := part.Header.Get("Content-Transfer-Encoding") - if encoding == "base64" { + if strings.EqualFold(encoding, "base64") { dr := base64.NewDecoder(base64.StdEncoding, part) dd, err := ioutil.ReadAll(dr) if err != nil {