Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a mechanism to augment the TldPatterns lists dynamically #1123

Open
gissuebot opened this issue Oct 31, 2014 · 7 comments
Open

Provide a mechanism to augment the TldPatterns lists dynamically #1123

gissuebot opened this issue Oct 31, 2014 · 7 comments

Comments

@gissuebot
Copy link

Original issue created by sheldonreedwhite on 2012-08-28 at 07:38 PM


There are valid domains that can't really be manipulated with InternetDomainName because their TLD isn't in the hard-coded TldPatterns.java class, but it's not reasonable to have to rebuild the Guava library every time a new TLD is encountered. There should be methods along the lines of addExactTld(), addUnderTld(), addExcludedTld() which would allow the user to augment (or perhaps completely override) the library's TLD set with values specific to the user's application.
For instance, using Guava 11.0.2 the valid domain "miele.pm" fails
Of course we could fork the Guava code to add this additional flexibility but we'd prefer not to.

Thanks in advance.

@gissuebot
Copy link
Author

Original comment posted by neveue on 2012-08-29 at 01:21 PM


I wonder if Google Chrome uses Guava to parse domain names. When I type "miele.pm" in the Chrome address bar (on an empty cache), and hit enter, it does a Google search for "miele.pm". But when I do the same for "miele.fr", Chrome detects that it's a domain name, and directly sends me to "miele.fr".

@gissuebot
Copy link
Author

Original comment posted by [email protected] on 2012-08-29 at 03:03 PM


It does not use Guava, but might use the same Public Suffix List we do.

@gissuebot
Copy link
Author

Original comment posted by wasserman.louis on 2012-08-29 at 03:54 PM


I don't think static state would be an okay thing here -- or anywhere in Guava -- but maybe there's room here for a builder or something for a pattern set?

@gissuebot
Copy link
Author

Original comment posted by [email protected] on 2012-10-23 at 04:50 PM


Would issue 475 solve your needs?


Labels: Package-Net, Type-Addition

@kamal2311
Copy link

Having a mechanism to dynamically lookup the public suffix list would be awesome. Please consider doing it.

Thank you.

@cpovirk cpovirk added the P3 label Jul 25, 2019
@cpovirk
Copy link
Member

cpovirk commented Jul 25, 2019

This might be slightly easier if we moved to Bazel.

@cpovirk
Copy link
Member

cpovirk commented Jul 30, 2019

I may have been mixing this up with #475. Possibly(?) this bug is more about adding patterns at runtime, while #475 is more about being able to build your own Guava with your own set of patterns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants