@Override
    public CookieSpec create(final HttpContext context) {
        if (cookieSpec == null) {
            synchronized (this) {
                if (cookieSpec == null) {
                    switch (this.compatibilityLevel) {
                        case STRICT:
                            this.cookieSpec = new RFC6265StrictSpec(
                                    new BasicPathHandler(),
                                    PublicSuffixDomainFilter.decorate(
                                            new BasicDomainHandler(), this.publicSuffixMatcher),
                                    new BasicMaxAgeHandler(),
                                    new BasicSecureHandler(),
                                    new BasicExpiresHandler(RFC6265StrictSpec.DATE_PATTERNS));
                            break;
                        case IE_MEDIUM_SECURITY:
                            this.cookieSpec = new RFC6265LaxSpec(
                                    new BasicPathHandler() {
                                        @Override
                                        public void validate(
                                                final Cookie cookie,
                                                final CookieOrigin origin) throws MalformedCookieException {
                                            // No validation
                                        }
                                    },
                                    PublicSuffixDomainFilter.decorate(
                                            new BasicDomainHandler(), this.publicSuffixMatcher),
                                    new BasicMaxAgeHandler(),
                                    new BasicSecureHandler(),
                                    new BasicExpiresHandler(RFC6265StrictSpec.DATE_PATTERNS));
                            break;
                        default:
                            this.cookieSpec = new RFC6265LaxSpec(
                                    new BasicPathHandler(),
                                    PublicSuffixDomainFilter.decorate(
                                            new BasicDomainHandler(), this.publicSuffixMatcher),
                                    new LaxMaxAgeHandler(),
                                    new BasicSecureHandler(),
                                    new LaxExpiresHandler());
                    }
                }
            }
        }
        return this.cookieSpec;
    }
{@link CookieSpecFactory} implementation that provides an instance of
RFC 6265 conformant cookie policy. The instance returned by this factory
can be shared by multiple threads.

@since 4.4
ngrinder-runtime/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpecFactory.java