Skip to content

Commit d90e7a1

Browse files
authored
hack to fix line length issues for quoted-printable (#8)
1 parent 64ceae7 commit d90e7a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

encoding.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package message
22

33
import (
4+
"bufio"
45
"bytes"
56
"encoding/base64"
67
"errors"
@@ -30,7 +31,7 @@ func encodingReader(enc string, r io.Reader) (io.Reader, error) {
3031
var dec io.Reader
3132
switch strings.ToLower(enc) {
3233
case "quoted-printable":
33-
dec = quotedprintable.NewReader(r)
34+
dec = quotedprintable.NewReader(bufio.NewReaderSize(r, 1024*8))
3435
case "base64":
3536
wrapped := &whitespaceReplacingReader{wrapped: r}
3637
dec = base64.NewDecoder(base64.StdEncoding, wrapped)

0 commit comments

Comments
 (0)