Browse Source

Handle 'application/xml' the same as 'text/xml'

(Go does not fallthrough switch statements.)
Caleb Spare 12 years ago
parent
commit
07c2fdc693
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/ngrok/client/views/web/http.go

+ 1 - 2
src/ngrok/client/views/web/http.go

@@ -112,8 +112,7 @@ func makeBody(h http.Header, body []byte) SerializedBody {
 	if b.RawContentType != "" {
 		b.ContentType = strings.TrimSpace(strings.Split(b.RawContentType, ";")[0])
 		switch b.ContentType {
-		case "application/xml":
-		case "text/xml":
+		case "application/xml", "text/xml":
 			err = xml.Unmarshal(body, new(XMLDoc))
 			if err != nil {
 				if syntaxError, ok := err.(*xml.SyntaxError); ok {