private static void mergeMaxAgeAndExpires(CookieBuilder builder, String header) {
        // max age has precedence over expires
        if (builder.maxAge != Cookie.UNDEFINED_MAX_AGE) {
            return;
        }

        if (isValueDefined(builder.expiresStart, builder.expiresEnd)) {
            final Date expiresDate =
                    DateFormatter.parseHttpDate(header, builder.expiresStart, builder.expiresEnd);
            if (expiresDate != null) {
                final long maxAgeMillis = expiresDate.getTime() - System.currentTimeMillis();
                builder.maxAge(maxAgeMillis / 1000 + (maxAgeMillis % 1000 != 0 ? 1 : 0));
            }
        }
    }
Parse and store a key-value pair. First one is considered to be the
cookie name/value. Unknown attribute names are silently discarded.

@param keyStart
           where the key starts in the header
@param keyEnd
           where the key ends in the header
@param valueStart
           where the value starts in the header
@param valueEnd
           where the value ends in the header
core/src/main/java/com/linecorp/armeria/common/ClientCookieDecoder.java