mirror of
https://github.com/minio/minio.git
synced 2025-01-23 04:33:15 -05:00
fix: aclHandlers convert XML parse error to relevant client error (#16587)
This commit is contained in:
parent
c8ffa59d28
commit
b9f5f9ba3f
@ -90,7 +90,7 @@ func (api objectAPIHandlers) PutBucketACLHandler(w http.ResponseWriter, r *http.
|
||||
if aclHeader == "" {
|
||||
acl := &accessControlPolicy{}
|
||||
if err = xmlDecoder(r.Body, acl, r.ContentLength); err != nil {
|
||||
if err == io.EOF {
|
||||
if terr, ok := err.(*xml.SyntaxError); ok && terr.Msg == io.EOF.Error() {
|
||||
writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingSecurityHeader),
|
||||
r.URL)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user