You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Andrei Dan (Jira)" <ji...@apache.org> on 2023/02/17 08:31:00 UTC
[jira] [Created] (HTTPCLIENT-2259) PublicSuffixMatcher returning incomplete domain root for private domains
Andrei Dan created HTTPCLIENT-2259:
--------------------------------------
Summary: PublicSuffixMatcher returning incomplete domain root for private domains
Key: HTTPCLIENT-2259
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2259
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient (classic)
Affects Versions: 5.2.1
Reporter: Andrei Dan
Hello,
I'm testing `org.apache.hc.client5.http.psl.PublicSuffixMatcher` from `org.apache.httpcomponents.client5` version `org.apache.httpcomponents.client5`.
First, running `getDomainRoot` for "test.co.uk" returns as expected "test.co.uk".
No problem here!
Then, running getDomainRoot for an "test.blogspot.com" returns "blogspot.com".
This doesn't change even if I add the second parameter as `DomainType.PRIVATE`.
Shouldn't the domain root be "test.blogspot.com", as "blogspot.com" is registered in the hardcoded PSL as a public suffix?
The method documentation for `getDomainRoot` says:
>Returns registrable part of the domain for the given domain name or null if given domain represents a public suffix.
But it is "test.blogspot.com" that is registrable, not "blogspot.com" itself.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org