don't swallow unknown encodings
This commit is contained in:
parent
d491e434a1
commit
fb3a698210
|
@ -75,6 +75,8 @@ func normalize(m []byte, encoding string) ([]byte, error) {
|
|||
s, err = ioutil.ReadAll(quotedprintable.NewReader(strings.NewReader(string(m))))
|
||||
} else if encoding == "base64" {
|
||||
s, err = ioutil.ReadAll(base64.NewDecoder(base64.StdEncoding, strings.NewReader(string(m))))
|
||||
} else {
|
||||
s = m
|
||||
}
|
||||
if err == io.ErrUnexpectedEOF {
|
||||
err = nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user