Class ServerCookie

All Implemented Interfaces:

public class ServerCookie extends Object implements Serializable
Server-side cookie representation. borrowed from Tomcat.
See Also:
  • Field Details

    • GMT_ZONE

      public static final TimeZone GMT_ZONE
      GMT timezone - all HTTP dates are on GMT
  • Constructor Details

    • ServerCookie

      public ServerCookie()
  • Method Details

    • isToken

      public static boolean isToken(String value)
    • containsCTL

      public static boolean containsCTL(String value, int version)
    • isToken2

      public static boolean isToken2(String value)
    • checkName

      public static boolean checkName(String name)
      - Not used
    • getCookieHeaderName

      public static String getCookieHeaderName(int version)
      Return the header name to set the cookie, based on cookie version.
    • formatOldCookie

      public static String formatOldCookie(Date d)
    • formatOldCookie

      public static void formatOldCookie(Date d, StringBuffer sb, FieldPosition fp)
    • appendCookieValue

      public static void appendCookieValue(StringBuilder headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean httpOnly, ServerCookie.SameSiteAttributeValue sameSite)
    • maybeQuote

      @Deprecated public static void maybeQuote(int version, StringBuffer buf, String value)
      - Not used
    • alreadyQuoted

      public static boolean alreadyQuoted(String value)
    • maybeQuote2

      public static void maybeQuote2(int version, StringBuffer buf, String value)
      Quotes values using rules that vary depending on Cookie version.
      version -
      buf -
      value -