]> 127.0.0.1 Git - front/.git/commitdiff
1
authorqydysky <qydysky@foxmail.com>
Tue, 18 Mar 2025 01:09:58 +0000 (01:09 +0000)
committerGitHub <noreply@github.com>
Tue, 18 Mar 2025 01:09:58 +0000 (01:09 +0000)
config.go

index 58a8675bc2e4a3ed7976544160f8dd98ac0e1c71..128b4cc1e6a28b050520dceedd00f68c2901cf0e 100755 (executable)
--- a/config.go
+++ b/config.go
@@ -237,7 +237,8 @@ func (t *Config) SwapSign(ctx context.Context, logger Logger) {
                                                        if e == nil {
                                                                defer putBack()
                                                                reqBufUsed = true
-                                                               _, _ = r.Body.Read(reqBuf)
+                                                               n, _ := 
+                                                               reqBuf = reqBuf[:n]
                                                                // if n, _ := r.Body.Read(reqBuf); n == cap(reqBuf) {
                                                                // logger.Warn(`W:`, fmt.Sprintf(logFormat, r.RemoteAddr, route.config.Addr, routePath, "Err", ErrReqReBodyOverflow))
                                                                //      w.Header().Add(header+"Error", ErrReqReBodyOverflow.Error())