Archived
1
0

fix sa hook

This commit is contained in:
Jeff Becker 2017-11-07 14:25:42 -05:00
parent d2552c5cd1
commit 69359700b4
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -46,7 +46,15 @@ func (sp *SpamFilter) Rewrite(msg io.Reader, out io.WriteCloser) error {
io.CopyBuffer(c, msg, buff[:]) io.CopyBuffer(c, msg, buff[:])
c.CloseWrite() c.CloseWrite()
r := bufio.NewReader(c) r := bufio.NewReader(c)
r.ReadString(10) for {
l, err := r.ReadString(10)
if err != nil {
return err
}
if len(l) == 1 {
break
}
}
_, err = io.CopyBuffer(out, r, buff[:]) _, err = io.CopyBuffer(out, r, buff[:])
c.Close() c.Close()
out.Close() out.Close()