mirror of https://github.com/minio/minio.git
remove unnecessary logs for truncated XML inputs (#16184)
This commit is contained in:
parent
9f71369b67
commit
90d35b70b4
|
@ -231,7 +231,14 @@ func xmlDecoder(body io.Reader, v interface{}, size int64) error {
|
|||
d := xml.NewDecoder(lbody)
|
||||
// Ignore any encoding set in the XML body
|
||||
d.CharsetReader = nopCharsetConverter
|
||||
return d.Decode(v)
|
||||
err := d.Decode(v)
|
||||
if errors.Is(err, io.EOF) {
|
||||
err = &xml.SyntaxError{
|
||||
Line: 0,
|
||||
Msg: err.Error(),
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// hasContentMD5 returns true if Content-MD5 header is set.
|
||||
|
|
Loading…
Reference in New Issue