Success path for fake tls is implemented

This commit is contained in:
9seconds
2019-11-07 13:04:38 +03:00
parent fd8506c82a
commit 038b2b200d
21 changed files with 777 additions and 111 deletions
+8 -2
View File
@@ -43,7 +43,10 @@ func (w *wrapperRewind) Read(p []byte) (int, error) {
}
n, err := w.parent.Read(p)
w.buf.Write(p[:n])
if !w.rewinded {
w.buf.Write(p[:n])
}
return n, err
}
@@ -59,7 +62,10 @@ func (w *wrapperRewind) ReadTimeout(p []byte, timeout time.Duration) (int, error
}
n, err := w.parent.ReadTimeout(p, timeout)
w.buf.Write(p[:n])
if !w.rewinded {
w.buf.Write(p[:n])
}
return n, err
}