felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvalc...@apache.org
Subject svn commit: r1169752 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
Date Mon, 12 Sep 2011 14:11:01 GMT
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;
             }
         }



Mime
View raw message