feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc * chore: use go 1.16 * chore: use go 1.16 * chore: use go ^1.16 * chore: remove deprecated
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
@@ -51,7 +50,7 @@ func decryptBody(key []byte, r *http.Request) error {
|
||||
content = make([]byte, r.ContentLength)
|
||||
_, err = io.ReadFull(r.Body, content)
|
||||
} else {
|
||||
content, err = ioutil.ReadAll(io.LimitReader(r.Body, maxBytes))
|
||||
content, err = io.ReadAll(io.LimitReader(r.Body, maxBytes))
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -69,7 +68,7 @@ func decryptBody(key []byte, r *http.Request) error {
|
||||
|
||||
var buf bytes.Buffer
|
||||
buf.Write(output)
|
||||
r.Body = ioutil.NopCloser(&buf)
|
||||
r.Body = io.NopCloser(&buf)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user