mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Make sure to drain body upon an error (#7197)
Also cleanup redundant code and use it at a common place
This commit is contained in:
committed by
kannappanr
parent
2d168b532b
commit
817269475f
@@ -25,6 +25,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/minio/minio/cmd/crypto"
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/auth"
|
||||
"github.com/minio/minio/pkg/event"
|
||||
@@ -552,7 +553,7 @@ func (s *serverConfig) loadToCachedConfigs() {
|
||||
URL: s.Policy.OPA.URL,
|
||||
AuthToken: s.Policy.OPA.AuthToken,
|
||||
Transport: NewCustomHTTPTransport(),
|
||||
CloseRespFn: CloseResponse,
|
||||
CloseRespFn: xhttp.DrainBody,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user