From 17250b81c0397645dc53e4ae3a4fbe2e54604119 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 21 Apr 2009 03:11:25 +0000 Subject: [PATCH] Minor change to permit xml req param as either xml or XML git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@165 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../org/eclipse/jetty/servlet/StatisticsServlet.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/StatisticsServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/StatisticsServlet.java index ed5accfc6e9..bc5789e79ce 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/StatisticsServlet.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/StatisticsServlet.java @@ -87,10 +87,15 @@ public class StatisticsServlet extends HttpServlet } } - if (req.getParameter("xml") != null && "true".equals(req.getParameter("xml"))) + String wantXml = req.getParameter("xml"); + if (wantXml == null) + wantXml = req.getParameter("XML"); + + if (wantXml != null && "true".equalsIgnoreCase(wantXml)) { sendXmlResponse(resp); - } else + } + else { sendTextResponse(resp); }