diff --git a/core/src/main/java/hudson/model/RSS.java b/core/src/main/java/hudson/model/RSS.java index 71bd5753e30cd169fe980d9d47f33827f5eab0a8..1d4870d13c8b2d84097bb935a662fee5d8a19cac 100644 --- a/core/src/main/java/hudson/model/RSS.java +++ b/core/src/main/java/hudson/model/RSS.java @@ -82,6 +82,12 @@ public final class RSS { if(flavor==null) flavor="atom"; flavor = flavor.replace('/', '_'); // Don't allow path to any jelly + if (flavor.equals("atom")) { + rsp.setContentType("application/atom+xml; charset=UTF-8"); + } else { + rsp.setContentType("text/xml; charset=UTF-8"); + } + req.getView(Jenkins.get(),"/hudson/"+flavor+".jelly").forward(req,rsp); } } diff --git a/test/src/test/java/hudson/model/RSSTest.java b/test/src/test/java/hudson/model/RSSTest.java index 35341e1f1f723ca08ae295f37371227d950e8528..cf081b182f0d404558bf5e5e41c05221c98b2a04 100644 --- a/test/src/test/java/hudson/model/RSSTest.java +++ b/test/src/test/java/hudson/model/RSSTest.java @@ -42,10 +42,7 @@ public class RSSTest { @Rule public JenkinsRule j = new JenkinsRule(); - //TODO remove the @Ignore - // Seems the XML parser on the CI machine is different / more picky than the one on my machine, will be covered by JENKINS-59231 to improve the code coverage @Test - @Ignore("XML parser too picky on CI") @Issue("JENKINS-59167") public void absoluteURLsPresentInRSS_evenWithoutRootUrlSetup() throws Exception { XmlPage page = getRssPage(); @@ -76,10 +73,7 @@ public class RSSTest { } } - //TODO remove the @Ignore - // Seems the XML parser on the CI machine is different / more picky than the one on my machine, will be covered by JENKINS-59231 to improve the code coverage @Test - @Ignore("XML parser too picky on CI") @Issue("JENKINS-59167") public void absoluteURLsPresentInAtom_evenWithoutRootUrlSetup() throws Exception { XmlPage page = getAtomPage();