mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 12:15:28 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user