Bring back the lines that didn't meant to be removed (#375)

This commit is contained in:
M. Mert Yıldıran
2021-10-19 16:22:47 +03:00
committed by GitHub
parent 29ba963c48
commit 6240d85377

View File

@@ -2,7 +2,10 @@ package main
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/up9inc/mizu/tap/api"
@@ -84,6 +87,9 @@ func handleHTTP1ClientStream(b *bufio.Reader, tcpID *api.TcpID, counterPair *api
}
counterPair.Request++
body, err := ioutil.ReadAll(req.Body)
req.Body = io.NopCloser(bytes.NewBuffer(body)) // rewind
ident := fmt.Sprintf(
"%s->%s %s->%s %d",
tcpID.SrcIP,
@@ -113,6 +119,9 @@ func handleHTTP1ServerStream(b *bufio.Reader, tcpID *api.TcpID, counterPair *api
}
counterPair.Response++
body, err := ioutil.ReadAll(res.Body)
res.Body = io.NopCloser(bytes.NewBuffer(body)) // rewind
ident := fmt.Sprintf(
"%s->%s %s->%s %d",
tcpID.DstIP,