From d483b127b71508dd880e1d6079ab9cdf42b9aad2 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 17 Apr 2015 21:50:56 -0700 Subject: [PATCH] gitweb: use text/xml instead of application/...+xml The various +xml types are actually text. We look for types starting with 'text/' to decide whether or not to enable certain features (such as highlighting). Return 'text/xml' for the text xml types rather than some obsure 'application/...' type so that the proper features will be enabled when we see these text types. Signed-off-by: Kyle J. McKay --- gitweb/gitweb.perl | 1 + 1 file changed, 1 insertion(+) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 8fa4637c5f..7ad61b2e7b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3888,6 +3888,7 @@ sub mimetype_guess_file { $ext = $1 if $filename =~ /\.([^.]*)$/; $ans = $mimemap{$ext} if $ext; $ans = 'text/html' if $ans && lc($ans) eq 'application/xhtml+xml'; + $ans = 'text/xml' if $ans && $ans =~ m!^application/[^\s:;,=]+\+xml$!i; return $ans; } -- 2.11.4.GIT