optimize request URL encoding for internode (#10811)

this reduces allocations in order of magnitude

Also, revert "erasure: delete dangling objects automatically (#10765)" 
affects list caching should be investigated.
This commit is contained in:
Harshavardhana
2020-11-02 15:15:12 -08:00
committed by GitHub
parent b456292295
commit 8527f22df1
4 changed files with 8 additions and 25 deletions

View File

@@ -109,7 +109,7 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod
if err != nil {
return nil, &NetworkError{err}
}
req.Header.Set("Authorization", "Bearer "+c.newAuthToken(req.URL.Query().Encode()))
req.Header.Set("Authorization", "Bearer "+c.newAuthToken(req.URL.RawQuery))
req.Header.Set("X-Minio-Time", time.Now().UTC().Format(time.RFC3339))
if length > 0 {
req.ContentLength = length