I am working on a java web app and I am setting the jsessionid attributes: HttpOnly, Secure and SameSite in the doFilter() method of InitSession class. I have this set as such:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { Cookie jsessionCookie = RequestHelper.getCookie(request, SESSION_COOKIE_NAME); SecurityWrapperResponse securityWrapperResponse = new SecurityWrapperResponse(response, "sanitize"); String contextPath = request.getServletContext() != null && StringUtils.isNotBlank(request.getServletContext().getContextPath()) ? request.getServletContext().getContextPath() : ROOT_CONTEXT; ESAPI.httpUtilities().setHeader("Set-Cookie", jsessionCookie.getName() + "=" + jsessionCookie.getValue() + SESSION_PATH_ATTRIBUTE + contextPath + SAME_SITE_ATTRIBUTE_VALUES); filterChain.doFilter(request, response); . . . }
When navigating to the 3rd page in the app I get the error: net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 This only started happening after I setHeader with the code above. Any ideas would be much appreciated!
Thanks
Advertisement
Answer
This issue was resolved by updating an old library that needed this update: https://mvnrepository.com/artifact/org.directwebremoting/dwr/3.0.2-RELEASE