From da5fec925272ff8fea313870f914c2fc554c16fa Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 30 Oct 2023 11:06:16 -0600 Subject: multi-client/http bugfixes --- client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 145b2f8..26fed10 100644 --- a/client.go +++ b/client.go @@ -123,7 +123,8 @@ type httpClient struct { } func (hc httpClient) RoundTrip(request *Request) (*Response, error) { - hreq, err := http.NewRequest("GET", request.URL.String(), request.Meta.(*io.LimitedReader)) + body, _ := request.Meta.(io.Reader) + hreq, err := http.NewRequest("GET", request.URL.String(), body) if err != nil { return nil, err } @@ -141,5 +142,5 @@ func (hc httpClient) RoundTrip(request *Request) (*Response, error) { } func (hc httpClient) IsRedirect(response *Response) bool { - return response.Meta.(*http.Request).Header.Get("Location") != "" + return response.Meta.(*http.Response).Header.Get("Location") != "" } -- cgit v1.2.3