Package com.microstrategy.utils
Class HttpUtils
- java.lang.Object
-
- com.microstrategy.utils.HttpUtils
-
public class HttpUtils extends java.lang.ObjectThis class provides static utility methods to eliminate Web Veracode false alarm for CWE ID 113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting').- Since:
- MicroStrategy Web 11.3.1
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCookie(javax.servlet.http.HttpServletResponse response, javax.servlet.http.Cookie cookie)The default behavior of this method is to call addCookie(Cookie cookie)static voidaddHeader(javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)The default behavior of this method is to return addHeader(String name, String value)static voidsendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String location)The default behavior of this method is to return sendRedirect(String location)static voidsetContentType(javax.servlet.ServletResponse response, java.lang.String type)Sets the content type of the response being sent to the clientstatic voidsetHeader(javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)The default behavior of this method is to return setHeader(String name, String value)
-
-
-
Method Detail
-
sendRedirect
public static void sendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String location) throws java.io.IOExceptionThe default behavior of this method is to return sendRedirect(String location)- Parameters:
response- HttpServletResponselocation- the redirect location URL- Throws:
java.io.IOException- If an input or output exception occurs
-
setHeader
public static void setHeader(javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)The default behavior of this method is to return setHeader(String name, String value)- Parameters:
response- HttpServletResponsename- the name of the headervalue- the header value If it contains octet string
-
addHeader
public static void addHeader(javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value)The default behavior of this method is to return addHeader(String name, String value)- Parameters:
response- HttpServletResponsename- the name of the headervalue- the header value If it contains octet string
-
addCookie
public static void addCookie(javax.servlet.http.HttpServletResponse response, javax.servlet.http.Cookie cookie)The default behavior of this method is to call addCookie(Cookie cookie)- Parameters:
response- HttpServletResponsecookie- the Cookie to return to the client
-
setContentType
public static void setContentType(javax.servlet.ServletResponse response, java.lang.String type)Sets the content type of the response being sent to the client- Parameters:
response- ServletResponsetype- aStringspecifying the MIME type of the content
-
-