Refine search
/** Default constructor */ public NetscapeDraftSpec(final String[] datepatterns) { super(); if (datepatterns != null) { this.datepatterns = datepatterns.clone(); } else { this.datepatterns = new String[] { EXPIRES_PATTERN }; } registerAttribHandler(ClientCookie.PATH_ATTR, new BasicPathHandler()); registerAttribHandler(ClientCookie.DOMAIN_ATTR, new NetscapeDomainHandler()); registerAttribHandler(ClientCookie.MAX_AGE_ATTR, new BasicMaxAgeHandler()); registerAttribHandler(ClientCookie.SECURE_ATTR, new BasicSecureHandler()); registerAttribHandler(ClientCookie.COMMENT_ATTR, new BasicCommentHandler()); registerAttribHandler(ClientCookie.EXPIRES_ATTR, new BasicExpiresHandler( this.datepatterns)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2109Spec(this.oneHeader, new RFC2109VersionHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2109DomainHandler(), this.publicSuffixMatcher), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler()); } } } return this.cookieSpec; }
/** * Constructor. * * @param browserVersion the {@link BrowserVersion} to simulate */ public HtmlUnitBrowserCompatCookieSpec(final BrowserVersion browserVersion) { super(new HtmlUnitVersionAttributeHandler(), new HtmlUnitDomainHandler(browserVersion), new HtmlUnitPathHandler(browserVersion), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new HtmlUnitExpiresHandler(browserVersion), new HtmlUnitHttpOnlyHandler()); }
/** Default constructor */ public BrowserCompatSpec(final String[] datepatterns) { super(); if (datepatterns != null) { this.datepatterns = datepatterns.clone(); } else { this.datepatterns = DATE_PATTERNS; } registerAttribHandler(ClientCookie.PATH_ATTR, new BasicPathHandler()); registerAttribHandler(ClientCookie.DOMAIN_ATTR, new BasicDomainHandler()); registerAttribHandler(ClientCookie.MAX_AGE_ATTR, new BasicMaxAgeHandler()); registerAttribHandler(ClientCookie.SECURE_ATTR, new BasicSecureHandler()); registerAttribHandler(ClientCookie.COMMENT_ATTR, new BasicCommentHandler()); registerAttribHandler(ClientCookie.EXPIRES_ATTR, new BasicExpiresHandler( this.datepatterns)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2109Spec(this.oneHeader, new RFC2109VersionHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2109DomainHandler(), this.publicSuffixMatcher), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler()); } } } return this.cookieSpec; }
/** Default constructor */ public RFC2109Spec(final String[] datepatterns, boolean oneHeader) { super(); if (datepatterns != null) { this.datepatterns = datepatterns.clone(); } else { this.datepatterns = DATE_PATTERNS; } this.oneHeader = oneHeader; registerAttribHandler(ClientCookie.VERSION_ATTR, new RFC2109VersionHandler()); registerAttribHandler(ClientCookie.PATH_ATTR, new BasicPathHandler()); registerAttribHandler(ClientCookie.DOMAIN_ATTR, new RFC2109DomainHandler()); registerAttribHandler(ClientCookie.MAX_AGE_ATTR, new BasicMaxAgeHandler()); registerAttribHandler(ClientCookie.SECURE_ATTR, new BasicSecureHandler()); registerAttribHandler(ClientCookie.COMMENT_ATTR, new BasicCommentHandler()); registerAttribHandler(ClientCookie.EXPIRES_ATTR, new BasicExpiresHandler( this.datepatterns)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2109Spec(this.oneHeader, new RFC2109VersionHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2109DomainHandler(), this.publicSuffixMatcher), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler()); } } } return this.cookieSpec; }
public RFC6265StrictSpec() { super(new BasicPathHandler(), new BasicDomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(DATE_PATTERNS)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2109Spec(this.oneHeader, new RFC2109VersionHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2109DomainHandler(), this.publicSuffixMatcher), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler()); } } } return this.cookieSpec; }
public RFC6265StrictSpec() { super(new BasicPathHandler(), new BasicDomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(DATE_PATTERNS)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2109Spec(this.oneHeader, new RFC2109VersionHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2109DomainHandler(), this.publicSuffixMatcher), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler()); } } } return this.cookieSpec; }
public RFC6265StrictSpec() { super(new BasicPathHandler(), new BasicDomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(DATE_PATTERNS)); }
/** * Constructor. * * @param browserVersion the {@link BrowserVersion} to simulate */ public HtmlUnitBrowserCompatCookieSpec(final BrowserVersion browserVersion) { super(new HtmlUnitVersionAttributeHandler(), new HtmlUnitDomainHandler(browserVersion), new HtmlUnitPathHandler(browserVersion), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new HtmlUnitExpiresHandler(browserVersion), new HtmlUnitHttpOnlyHandler()); }
public RFC6265StrictSpec() { super(new BasicPathHandler(), new BasicDomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(DATE_PATTERNS)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2965Spec(this.oneHeader, new RFC2965VersionAttributeHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2965DomainAttributeHandler(), this.publicSuffixMatcher), new RFC2965PortAttributeHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new RFC2965CommentUrlAttributeHandler(), new RFC2965DiscardAttributeHandler()); } } } return this.cookieSpec; }
public RFC6265StrictSpec() { super(new BasicPathHandler(), new BasicDomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(DATE_PATTERNS)); }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2965Spec(this.oneHeader, new RFC2965VersionAttributeHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2965DomainAttributeHandler(), this.publicSuffixMatcher), new RFC2965PortAttributeHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new RFC2965CommentUrlAttributeHandler(), new RFC2965DiscardAttributeHandler()); } } } return this.cookieSpec; }
private PromiscuousCookieSpec() { super( new BasicPathHandler(), new BasicDomainHandler() { @Override public boolean match(Cookie cookie, CookieOrigin origin) { return true; } @Override public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException { // Accept any } }, new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicExpiresHandler(new String[] { DateUtils.PATTERN_RFC1123, DateUtils.PATTERN_RFC1036, DateUtils.PATTERN_ASCTIME }) ); } }
@Override public CookieSpec create(final HttpContext context) { if (cookieSpec == null) { synchronized (this) { if (cookieSpec == null) { this.cookieSpec = new RFC2965Spec(this.oneHeader, new RFC2965VersionAttributeHandler(), new BasicPathHandler(), PublicSuffixDomainFilter.decorate( new RFC2965DomainAttributeHandler(), this.publicSuffixMatcher), new RFC2965PortAttributeHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new RFC2965CommentUrlAttributeHandler(), new RFC2965DiscardAttributeHandler()); } } } return this.cookieSpec; }
/** Default constructor */ public RFC2109Spec(final String[] datepatterns, final boolean oneHeader) { super(new RFC2109VersionHandler(), new BasicPathHandler(), new RFC2109DomainHandler(), new BasicMaxAgeHandler(), new BasicSecureHandler(), new BasicCommentHandler(), new BasicExpiresHandler( datepatterns != null ? datepatterns.clone() : DATE_PATTERNS)); this.oneHeader = oneHeader; }