Examples of PublicSuffixMatcher


Examples of org.apache.http.conn.util.PublicSuffixMatcher

    }

    public CloseableHttpClient build() {
        // Create main request executor
        // We copy the instance fields to avoid changing them, and rename to avoid accidental use of the wrong version
        PublicSuffixMatcher publicSuffixMatcherCopy = this.publicSuffixMatcher;
        if (publicSuffixMatcherCopy == null) {
            publicSuffixMatcherCopy = PublicSuffixMatcherLoader.getDefault();
        }

        HttpRequestExecutor requestExecCopy = this.requestExec;
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    public PublicSuffixDomainFilter(
            final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList) {
        Args.notNull(handler, "Cookie handler");
        Args.notNull(suffixList, "Public suffix list");
        this.handler = handler;
        this.publicSuffixMatcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

        wrapped.validate(cookie, origin);
    }

    private boolean isForPublicSuffix(final Cookie cookie) {
        if (matcher == null) {
            matcher = new PublicSuffixMatcher(this.suffixes, this.exceptions);
        }
        return matcher.matches(cookie.getDomain());
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    }

    public CloseableHttpClient build() {
        // Create main request executor
        // We copy the instance fields to avoid changing them, and rename to avoid accidental use of the wrong version
        PublicSuffixMatcher publicSuffixMatcherCopy = this.publicSuffixMatcher;
        if (publicSuffixMatcherCopy == null) {
            publicSuffixMatcherCopy = PublicSuffixMatcherLoader.getDefault();
        }

        HttpRequestExecutor requestExecCopy = this.requestExec;
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    private DefaultHostnameVerifier implWithPublicSuffixCheck;

    @Before
    public void setup() {
        impl = new DefaultHostnameVerifier();
        publicSuffixMatcher = new PublicSuffixMatcher(Arrays.asList("com", "co.jp", "gov.uk"), null);
        implWithPublicSuffixCheck = new DefaultHostnameVerifier(publicSuffixMatcher);
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

            final org.apache.http.conn.util.PublicSuffixListParser parser = new org.apache.http.conn.util.PublicSuffixListParser();
            suffixList = parser.parse(new InputStreamReader(in, Consts.UTF_8));
        } finally {
            in.close();
        }
        final PublicSuffixMatcher matcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
        this.filter = new PublicSuffixDomainFilter(new RFC2109DomainHandler(), matcher);
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    @Test
    public void testPublicSuffixFilter() throws Exception {
        final BasicClientCookie cookie = new BasicClientCookie("name", "value");

        final PublicSuffixMatcher matcher = new PublicSuffixMatcher(Arrays.asList("co.uk", "com"), null);
        final PublicSuffixDomainFilter h = new PublicSuffixDomainFilter(new RFC2109DomainHandler(), matcher);

        cookie.setDomain(".co.uk");
        Assert.assertFalse(h.match(cookie, new CookieOrigin("apache.co.uk", 80, "/stuff", false)));
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList) {
        Args.notNull(handler, "Cookie handler");
        Args.notNull(suffixList, "Public suffix list");
        this.handler = handler;
        this.matcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList) {
        Args.notNull(handler, "Cookie handler");
        Args.notNull(suffixList, "Public suffix list");
        this.handler = handler;
        this.matcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
    }
View Full Code Here

Examples of org.apache.http.conn.util.PublicSuffixMatcher

    public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList) {
        Args.notNull(handler, "Cookie handler");
        Args.notNull(suffixList, "Public suffix list");
        this.handler = handler;
        this.matcher = new PublicSuffixMatcher(suffixList.getRules(), suffixList.getExceptions());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.