explicitly set text/html as the conntent-type response header field in ClientConfigurationServlet;

this as temporary aftermath for bug5153 to make sure clients take HTML documents as such
and not as the default text/plain as reported for some cases when the URL contained
queries, e.g., for sailtracks.sapsailing.com
This commit is contained in:
Axel Uhl
2020-04-26 15:33:03 +02:00
parent b63ad7195b
commit 3d4c61b84b
2 changed files with 3 additions and 0 deletions
@@ -8,6 +8,7 @@ Bundle-Vendor: SAP
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: javax.servlet;version="3.1.0",
javax.servlet.http;version="3.1.0",
javax.ws.rs.core;version="1.1.1",
org.apache.http
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
@@ -12,6 +12,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.core.MediaType;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpStatus;
@@ -82,6 +83,7 @@ public class ClientConfigurationServlet extends HttpServlet {
final String servletPath = req.getServletPath();
final byte[] cachedPage;
final String pageKey = generateKey(servletPath, deBrandingActive);
resp.setContentType(MediaType.TEXT_HTML);
if ((cachedPage = cache.get(pageKey)) != null) {
IOUtils.write(cachedPage, resp.getOutputStream());
} else {