Merge pull request #5906 from justinsb/fix_gcs_preferred_hash

Google Cloud Storage md5 decoding fix
This commit is contained in:
k8s-ci-robot 2018-10-10 07:27:40 -07:00 committed by GitHub
commit b7c42e1875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ package vfs
import (
"bytes"
"encoding/base64"
"encoding/hex"
"fmt"
"io"
"net/http"
@ -351,7 +350,7 @@ func (p *GSPath) Hash(a hashing.HashAlgorithm) (*hashing.Hash, error) {
return nil, nil
}
md5Bytes, err := hex.DecodeString(md5)
md5Bytes, err := base64.StdEncoding.DecodeString(md5)
if err != nil {
return nil, fmt.Errorf("Etag was not a valid MD5 sum: %q", md5)
}