From 09f1ecc52772c5c6909619ab4ccb3bc93acd890f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 8 Mar 2011 22:04:49 -0800 Subject: [PATCH] Fixed issue with repeated "no element found" errors --- .../guacamole/net/tunnel/GuacamoleTunnelServlet.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/net/tunnel/GuacamoleTunnelServlet.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/net/tunnel/GuacamoleTunnelServlet.java index 8cb1ddaff..6a09fa0f7 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/net/tunnel/GuacamoleTunnelServlet.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/net/tunnel/GuacamoleTunnelServlet.java @@ -146,6 +146,13 @@ public abstract class GuacamoleTunnelServlet extends HttpServlet { HttpSession httpSession = request.getSession(false); GuacamoleSession session = new GuacamoleSession(httpSession); + // We still need to set the content type to avoid the default of + // text/html, as such a content type would cause some browsers to + // attempt to parse the result, even though the JavaScript client + // does not explicitly request such parsing. + response.setContentType("application/octet-stream"); + response.setContentLength(0); + // Send data try {