Skip to content

Commit 8c1356e

Browse files
committed
Fix for some S3 operations accepting JSON despite declared as XML operation
1 parent 972fde4 commit 8c1356e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

iamlivecore/proxy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,11 @@ func handleAWSRequest(req *http.Request, body []byte, respCode int) {
688688
mxjXML, err := mxj.NewMapXml(body)
689689
bodyXML := map[string]interface{}(mxjXML)
690690
if err != nil {
691-
return
691+
// last chance effort to parse as JSON
692+
err := json.Unmarshal(body, &bodyXML)
693+
if err != nil {
694+
return
695+
}
692696
}
693697

694698
flatten(true, params, bodyXML, "")

0 commit comments

Comments
 (0)