mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Reduce allocations (#17584)
* Reduce allocations * Add stringsHasPrefixFold which can compare string prefixes, while ignoring case and not allocating. * Reuse all msgp.Readers * Reuse metadata buffers when not reading data. * Make type safe. Make buffer 4K instead of 8. * Unslice
This commit is contained in:
@@ -62,8 +62,9 @@ func getCanonicalHeaders(signedHeaders http.Header) string {
|
||||
var headers []string
|
||||
vals := make(http.Header)
|
||||
for k, vv := range signedHeaders {
|
||||
headers = append(headers, strings.ToLower(k))
|
||||
vals[strings.ToLower(k)] = vv
|
||||
k = strings.ToLower(k)
|
||||
headers = append(headers, k)
|
||||
vals[k] = vv
|
||||
}
|
||||
sort.Strings(headers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user