Fixed FELIX-2889 : Invalid JSON content in http response after starting or stopping a bundle.
https://issues.apache.org/jira/browse/FELIX-2889

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1169752 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
index 5878d27..46168e6 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -353,8 +353,10 @@
                 }
 
                 // write the state only
-                resp.getWriter().print("{fragment:" + isFragmentBundle(bundle) //
-                    + ",stateRaw:" + bundle.getState() + "}");
+                resp.setContentType( "application/json" ); //$NON-NLS-1$
+                resp.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
+                resp.getWriter().print("{fragment:" + isFragmentBundle(bundle) // //$NON-NLS-1$
+                    + ",stateRaw:" + bundle.getState() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
                 return;
             }
         }