Class CookieProcessorBase

    • Field Detail


        protected static final java.lang.ThreadLocal<java.text.DateFormat> COOKIE_DATE_FORMAT

        protected static final java.lang.String ANCIENT_DATE
    • Constructor Detail

      • CookieProcessorBase

        public CookieProcessorBase()
    • Method Detail

      • setSameSiteCookies

        public void setSameSiteCookies​(java.lang.String sameSiteCookies)
      • generateHeader

        public java.lang.String generateHeader​(Cookie cookie,
                                               HttpServletRequest request)
        This implementation calls the deprecated CookieProcessor.generateHeader(Cookie) method. Implementors should not rely on this method as it is present only for transitional compatibility and will be removed in Tomcat 9.
        Generate the Set-Cookie HTTP header value for the given Cookie. This method receives as parameter the servlet request so that it can make decisions based on request properties. One such use-case is decide if the SameSite attribute should be added to the cookie based on the User-Agent or other request header because there are browser versions incompatible with the SameSite attribute. This is described by the Chromium project.
        Specified by:
        generateHeader in interface CookieProcessor
        cookie - The cookie for which the header will be generated
        request - The servlet request
        The header value in a form that can be added directly to the response