You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-29 23:07:40 +02:00
Wrap custom transport bodies with a context reader
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/ncw/swift/v2"
|
||||
|
||||
"github.com/imgproxy/imgproxy/v3/config"
|
||||
"github.com/imgproxy/imgproxy/v3/ctxreader"
|
||||
)
|
||||
|
||||
type transport struct {
|
||||
@@ -105,7 +106,7 @@ func (t transport) RoundTrip(req *http.Request) (resp *http.Response, err error)
|
||||
ProtoMajor: 1,
|
||||
ProtoMinor: 0,
|
||||
Header: header,
|
||||
Body: object,
|
||||
Body: ctxreader.New(req.Context(), object, true),
|
||||
Close: true,
|
||||
Request: req,
|
||||
}, nil
|
||||
|
||||
Reference in New Issue
Block a user