fix sa hook
This commit is contained in:
parent
d2552c5cd1
commit
69359700b4
@ -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()
|
||||||
|
Reference in New Issue
Block a user