Merge remote-tracking branch 'origin/release-4.9' into merge-release-4.9

This commit is contained in:
Jesús Espino
2018-04-10 11:29:03 +02:00
7 changed files with 27 additions and 21 deletions

View File

@@ -260,13 +260,13 @@ func (c Client) uploadPart(ctx context.Context, bucketName, objectName, uploadID
// Set encryption headers, if any.
customHeader := make(http.Header)
for k, v := range metadata {
if len(v) > 0 {
if strings.HasPrefix(strings.ToLower(k), serverEncryptionKeyPrefix) {
customHeader.Set(k, v)
}
}
}
// for k, v := range metadata {
// if len(v) > 0 {
// if strings.HasPrefix(strings.ToLower(k), serverEncryptionKeyPrefix) {
// customHeader.Set(k, v)
// }
// }
// }
reqMetadata := requestMetadata{
bucketName: bucketName,

View File

@@ -207,7 +207,7 @@ func (c Client) putObjectMultipartStreamNoLength(ctx context.Context, bucketName
if rErr == io.EOF && partNumber > 1 {
break
}
if rErr != nil && rErr != io.ErrUnexpectedEOF {
if rErr != nil && rErr != io.ErrUnexpectedEOF && rErr != io.EOF {
return 0, rErr
}
// Update progress reader appropriately to the latest offset