]> 127.0.0.1 Git - front/.git/commitdiff
1 v0.1.20241008043144
authorqydysky <qydysky@foxmail.com>
Tue, 8 Oct 2024 04:29:50 +0000 (04:29 +0000)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 04:29:50 +0000 (04:29 +0000)
http.go

diff --git a/http.go b/http.go
index 1a600fccb89e12e8def2291283747e8680b72bc7..d54863723872855dbd79d3bc6cda45d76faf93dc 100644 (file)
--- a/http.go
+++ b/http.go
@@ -43,7 +43,12 @@ func (httpDealer) Deal(ctx context.Context, w http.ResponseWriter, r *http.Reque
 
        url = dealUri(url, chosenBack.getDealerReqUri())
 
-       req, e := http.NewRequestWithContext(ctx, r.Method, url, r.Body)
+       reqBody, e := r.GetBody()
+       if e != nil {
+               return ErrReqCreFail
+       }
+
+       req, e := http.NewRequestWithContext(ctx, r.Method, url, reqBody)
        if e != nil {
                return ErrReqCreFail
        }