# HG changeset patch # User Sascha L. Teichmann # Date 1533807898 -7200 # Node ID 765e056ab4e875bd43782c23c6c969058b55cfdb # Parent c63200982ce739dc5bc0dbec693591f9aa1d6c8c Recognize more XML content types in WFS proxy. diff -r c63200982ce7 -r 765e056ab4e8 controllers/externalwfs.go --- a/controllers/externalwfs.go Thu Aug 09 10:13:09 2018 +0200 +++ b/controllers/externalwfs.go Thu Aug 09 11:44:58 2018 +0200 @@ -194,12 +194,19 @@ return nil } +var xmlContentTypes = []string{ + "application/xml", + "text/xml", + "application/gml+xml", +} + func isXML(h http.Header) bool { for _, t := range h["Content-Type"] { t = strings.ToLower(t) - if strings.Contains(t, "text/xml") || - strings.Contains(t, "application/xml") { - return true + for _, ct := range xmlContentTypes { + if strings.Contains(t, ct) { + return true + } } } return false