You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/02/09 06:23:01 UTC

[karaf] branch master updated: Set the Content-Type header in the webconsole for gogo. Currently we only set it correctly for the gzip case

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new 67744a8  Set the Content-Type header in the webconsole for gogo. Currently we only set it correctly for the gzip case
     new d4e609d  Merge pull request #760 from coheigea/gogo_contenttype
67744a8 is described below

commit 67744a800d8a4f16914a53a7ec7474094a55ba5a
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Feb 7 12:48:40 2019 +0000

    Set the Content-Type header in the webconsole for gogo. Currently we only set it correctly for the gzip case
---
 .../gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java b/webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java
index d95af9c..120bd4c 100644
--- a/webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java
+++ b/webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java
@@ -165,6 +165,7 @@ public class GogoPlugin extends AbstractWebConsolePlugin {
                     ie.printStackTrace();
                 }
             } else {
+                response.setHeader("Content-Type", "text/html");
                 response.getOutputStream().write(dump.getBytes());
             }
         }