1
0
mirror of https://github.com/minio/mc.git synced 2025-11-13 12:22:45 +03:00

Make sure to set the Date's properly in s3Client

This commit is contained in:
Harshavardhana
2015-04-27 04:28:37 -07:00
parent f0842dbb6d
commit 877d32236c
4 changed files with 3 additions and 5 deletions

View File

@@ -82,9 +82,6 @@ func (a *s3Client) getTLSTransport() (*http.Transport, error) {
}
func (a *s3Client) signRequest(req *http.Request, host string) {
if date := req.Header.Get("Date"); date == "" {
req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
}
hm := hmac.New(sha1.New, []byte(a.SecretAccessKey))
ss := a.stringToSign(req, host)
//fmt.Printf("String to sign: %q (%x)\n", ss, ss)