mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
api: verify Location constraint for make bucket. (#1342)
This commit is contained in:
committed by
Harshavardhana
parent
c3d0a3d51e
commit
cb1116725b
@@ -18,11 +18,18 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"strings"
|
||||
|
||||
"encoding/xml"
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
"io"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// xmlDecoder provide decoded value in xml.
|
||||
func xmlDecoder(body io.Reader, v interface{}) error {
|
||||
d := xml.NewDecoder(body)
|
||||
return d.Decode(v)
|
||||
}
|
||||
|
||||
// checkValidMD5 - verify if valid md5, returns md5 in bytes.
|
||||
func checkValidMD5(md5 string) ([]byte, *probe.Error) {
|
||||
md5Bytes, e := base64.StdEncoding.DecodeString(strings.TrimSpace(md5))
|
||||
|
||||
Reference in New Issue
Block a user