diff --git a/ridgenative.go b/ridgenative.go index cf52a18..ca4bb9f 100644 --- a/ridgenative.go +++ b/ridgenative.go @@ -378,6 +378,9 @@ func isBinary(contentType string) bool { if strings.EqualFold(mediaType, "application/json") { return false } + if strings.EqualFold(mediaType, "application/yaml") { + return false + } if strings.EqualFold(mediaType, "application/javascript") { return false } @@ -393,6 +396,9 @@ func isBinary(contentType string) bool { if strings.EqualFold(suffix, "+json") { return false } + if strings.EqualFold(suffix, "+yaml") { + return false + } if strings.EqualFold(suffix, "+xml") { return false } diff --git a/ridgenative_test.go b/ridgenative_test.go index 810548b..abacbb4 100644 --- a/ridgenative_test.go +++ b/ridgenative_test.go @@ -960,10 +960,12 @@ func TestIsBinary(t *testing.T) { {"text/xml", false}, {"application/json", false}, {"application/javascript", false}, + {"application/yaml", false}, {"application/xml", false}, - {"application/foo+json", false}, - {"application/foo+xml", false}, - {"application/foo+xml ; charset=utf8", false}, + {"application/vnd.foo+json", false}, + {"application/vnd.foo+yaml", false}, + {"application/vnd.foo+xml", false}, + {"application/vnd.foo+xml ; charset=utf8", false}, {"application/octet-stream", true}, {"image/jpeg", true}, {"audio/mpeg", true},