@ -1176,6 +1176,11 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
}
}
}
}
// This request header needs to be set prior to setting ObjectOptions
if globalAutoEncryption && ! crypto . SSEC . IsRequested ( r . Header ) {
r . Header . Add ( crypto . SSEHeader , crypto . SSEAlgorithmAES256 )
}
actualSize := size
actualSize := size
if objectAPI . IsCompressionSupported ( ) && isCompressible ( r . Header , object ) && size > 0 {
if objectAPI . IsCompressionSupported ( ) && isCompressible ( r . Header , object ) && size > 0 {
@ -1205,10 +1210,6 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
rawReader := hashReader
rawReader := hashReader
pReader := NewPutObjReader ( rawReader , nil , nil )
pReader := NewPutObjReader ( rawReader , nil , nil )
// This request header needs to be set prior to setting ObjectOptions
if globalAutoEncryption && ! crypto . SSEC . IsRequested ( r . Header ) {
r . Header . Add ( crypto . SSEHeader , crypto . SSEAlgorithmAES256 )
}
// get gateway encryption options
// get gateway encryption options
var opts ObjectOptions
var opts ObjectOptions
opts , err = putOpts ( ctx , r , bucket , object , metadata )
opts , err = putOpts ( ctx , r , bucket , object , metadata )