You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by vv...@apache.org on 2011/09/12 16:11:01 UTC

svn commit: r1169752 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java

Author: vvalchev
Date: Mon Sep 12 14:11:01 2011
New Revision: 1169752

URL: http://svn.apache.org/viewvc?rev=1169752&view=rev
Log:
Fixed FELIX-2889 : Invalid JSON content in http response after starting or stopping a bundle.
https://issues.apache.org/jira/browse/FELIX-2889

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java?rev=1169752&r1=1169751&r2=1169752&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java Mon Sep 12 14:11:01 2011
@@ -353,8 +353,10 @@ public class BundlesServlet extends Simp
                 }
 
                 // 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;
             }
         }