commit | a503680b9f99eac595edddabd18e04f97724c854 | [log] [tgz] |
---|---|---|
author | Valentin Valchev <vvalchev@apache.org> | Mon Sep 12 14:11:01 2011 +0000 |
committer | Valentin Valchev <vvalchev@apache.org> | Mon Sep 12 14:11:01 2011 +0000 |
tree | 0a36982e274bd454523b4e4345be20e0546ffbab | |
parent | 4d1167be48dc79020796aef695cccb217075647c [diff] |
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; } }