public void addIntHeader(String name, int value) { resp.addIntHeader(name, value); }
/** * @param arg0 * @param arg1 * @see javax.servlet.http.HttpServletResponse#addIntHeader(java.lang.String, int) */ @Override public void addIntHeader(String arg0, int arg1) { response.addIntHeader(arg0, arg1); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
httpResponse.addIntHeader(CONTENT_LENGTH.toString(), compressed.length); httpResponse.addHeader(CONTENT_ENCODING.toString(), DEFLATE.toString()); httpResponse.getOutputStream().write(compressed, 0, compressed.length);
@Override public void addIntHeader(String s, int i) { servletResponse.addIntHeader(s, i); }
@Override public void addIntHeader(String name, int value) { proxy.addIntHeader(name, value); }
public InnerPrintWriter addIntHeader(String name, int value) { response.addIntHeader(name, value); return this; }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { getHttpServletResponse().addIntHeader(name, value); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
public void addToResponse(String key, HttpServletResponse response) { if (_type == Type.COOKIE) { response.addCookie(_cookieValue); } else if (_type == Type.DATE) { response.addDateHeader(key, _dateValue); } else if (_type == Type.INTEGER) { response.addIntHeader(key, _intValue); } else if (_type == Type.STRING) { response.addHeader(key, _stringValue); } else { throw new IllegalStateException("Invalid type " + _type); } }
public static void addSecurityHeaders(final HttpServletResponse resp) { if (resp.containsHeader("X-Content-Type-Options")) { resp.setHeader("X-Content-Type-Options", "nosniff"); } else { resp.addHeader("X-Content-Type-Options", "nosniff"); } if (resp.containsHeader("X-XSS-Protection")) { resp.setHeader("X-XSS-Protection", "1;mode=block"); } else { resp.addHeader("X-XSS-Protection", "1;mode=block"); } if (resp.containsHeader("content-security-policy")) { resp.setIntHeader("content-security-policy", 1); }else { resp.addIntHeader("content-security-policy", 1); } resp.addHeader("content-security-policy","default-src=none"); resp.addHeader("content-security-policy","script-src=self"); resp.addHeader("content-security-policy","connect-src=self"); resp.addHeader("content-security-policy","img-src=self"); resp.addHeader("content-security-policy","style-src=self"); }
public void addIntHeader(String name, int value) { servletResponse.addIntHeader(name, value); } }
public static void setHeader(final HttpServletResponse response, final String name, final Object value) { if (value instanceof Long) { response.addDateHeader(name, ((Long) value).longValue()); } else if (value instanceof Integer) { response.addIntHeader(name, ((Integer) value).intValue()); } else if (value instanceof String) { response.addHeader(name, (String) value); } else { throw new IllegalStateException("Unrecognized type for header [" + name + "], value is: " + value); } }
/** * The default behavior of this method is to call addIntHeader(String name, * int value) on the wrapped response object. */ @Override public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }
/** * Disallow <code>addIntHeader()</code> calls on an included response. * * @param name The new header name * @param value The new header value */ @Override public void addIntHeader(String name, int value) { if (!included) ((HttpServletResponse) getResponse()).addIntHeader(name, value); }
/** * Disallow <code>addIntHeader()</code> calls on an included response. * * @param name The new header name * @param value The new header value */ @Override public void addIntHeader(String name, int value) { if (!included) ((HttpServletResponse) getResponse()).addIntHeader(name, value); }
/** * The default behavior of this method is to call addIntHeader(String name, int value) * on the wrapped response object. */ @Override public void addIntHeader(String name, int value) { this._getHttpServletResponse().addIntHeader(name, value); }