This commit is contained in:
HaiLaz
2023-02-20 21:57:49 +08:00
committed by GitHub
parent a64d1001e2
commit 8dc8dd9756

View File

@ -240,7 +240,7 @@ func (r *Request) parseBody() {
r.bodyMap, _ = gxml.DecodeWithoutRoot(body)
}
// Default parameters decoding.
if r.bodyMap == nil {
if contentType := r.Header.Get("Content-Type"); (contentType == "" || !gstr.Contains(contentType, "multipart/")) && r.bodyMap == nil {
r.bodyMap, _ = gstr.Parse(r.GetBodyString())
}
}