mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
handle racy updates to globalSite config (#19750)
``` ================== WARNING: DATA RACE Read at 0x0000082be990 by goroutine 205: github.com/minio/minio/cmd.setCommonHeaders() Previous write at 0x0000082be990 by main goroutine: github.com/minio/minio/cmd.lookupConfigs() ```
This commit is contained in:
@@ -750,7 +750,7 @@ func newTestStreamingRequest(method, urlStr string, dataLength, chunkSize int64,
|
||||
func assembleStreamingChunks(req *http.Request, body io.ReadSeeker, chunkSize int64,
|
||||
secretKey, signature string, currTime time.Time) (*http.Request, error,
|
||||
) {
|
||||
regionStr := globalSite.Region
|
||||
regionStr := globalSite.Region()
|
||||
var stream []byte
|
||||
var buffer []byte
|
||||
body.Seek(0, 0)
|
||||
@@ -858,7 +858,7 @@ func preSignV4(req *http.Request, accessKeyID, secretAccessKey string, expires i
|
||||
return errors.New("Presign cannot be generated without access and secret keys")
|
||||
}
|
||||
|
||||
region := globalSite.Region
|
||||
region := globalSite.Region()
|
||||
date := UTCNow()
|
||||
scope := getScope(date, region)
|
||||
credential := fmt.Sprintf("%s/%s", accessKeyID, scope)
|
||||
@@ -986,7 +986,7 @@ func signRequestV4(req *http.Request, accessKey, secretKey string) error {
|
||||
}
|
||||
sort.Strings(headers)
|
||||
|
||||
region := globalSite.Region
|
||||
region := globalSite.Region()
|
||||
|
||||
// Get canonical headers.
|
||||
var buf bytes.Buffer
|
||||
|
||||
Reference in New Issue
Block a user