commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Nebolsin (JIRA)" <>
Subject [jira] Commented: (VALIDATOR-248) Add an option to allow 'localhost' as a valid hostname part in the URL
Date Wed, 07 Nov 2007 06:37:50 GMT


Sergey Nebolsin commented on VALIDATOR-248:

Ok, I do agree. ALLOW_MACHINE_NAMES with a list of allowed machine names is a good start anyway,
and it'll cover most possible cases. Can I also suggest what machine names in this list to
be treated as regexps, so I will be able to specify things like "all machines from my local
domain" or "all machines with names like xyz-*". I think in this case it will be flexible
enough to cover almost all cases without further complication of UrlValidator.

If such solution is desirable I'll create a separate issue and link this ticket to it, since
ALLOW_MACHINE_NAMES feature will perfectly cover 'localhost' case, and there will be no need

> Add an option to allow 'localhost' as a valid hostname part in the URL
> ----------------------------------------------------------------------
>                 Key: VALIDATOR-248
>                 URL:
>             Project: Commons Validator
>          Issue Type: Improvement
>          Components: Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Sergey Nebolsin
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>         Attachments: commons-validator-allow-localhost-r592416.patch, commons-validator-allow-non-iana-tlds-r592416.patch
> Working on Grails we've discovered ( that
commons-validator's UrlValidator rejects URLs like "http://localhost:8080/tau_gwi_00/clif/cb/19".
I looked at commons-validator sources and found that any URL which contains 'localhost' as
it's hostname part will be rejected.
> RFC-2396 ( accepts 'localhost' as a valid hostname
(appendix G.3 paragraph 2 says that explicitly).
> So, it would be good to have additional option (UrlValidator.ALLOW_LOCALHOST) which will
control UrlValidator behavior on localhost URLs.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message