Skip to content

Commit

Permalink
Remove unneeded body reading
Browse files Browse the repository at this point in the history
  • Loading branch information
ivannpaz committed Apr 2, 2020
1 parent 9bb7b8a commit ea064ca
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libbeat/outputs/elasticsearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -861,11 +861,6 @@ func (conn *Connection) execHTTPRequest(req *http.Request) (int, []byte, error)
req.Host = host
}

if req.Body != nil {
body, _ := ioutil.ReadAll(req.Body)
req.Body = ioutil.NopCloser(bytes.NewBuffer(body))
}

resp, err := conn.http.Do(req)
if err != nil {
return 0, nil, err
Expand Down

0 comments on commit ea064ca

Please sign in to comment.