Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 26871 invoked from network); 6 Nov 2007 22:25:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 22:25:26 -0000 Received: (qmail 23192 invoked by uid 500); 6 Nov 2007 22:25:12 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 23136 invoked by uid 500); 6 Nov 2007 22:25:12 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 23127 invoked by uid 99); 6 Nov 2007 22:25:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 14:25:12 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 22:25:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 997B971418F for ; Tue, 6 Nov 2007 14:24:50 -0800 (PST) Message-ID: <14681723.1194387890625.JavaMail.jira@brutus> Date: Tue, 6 Nov 2007 14:24:50 -0800 (PST) From: "Sergey Nebolsin (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (VALIDATOR-248) Add an option to allow 'localhost' as a valid hostname part in the URL In-Reply-To: <24526291.1194379490613.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VALIDATOR-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Nebolsin updated VALIDATOR-248: -------------------------------------- Attachment: commons-validator-allow-non-iana-tlds-r592416.patch This new patch against rev. 592416 adds the ability to allow top-level domains which are not defined by IANA (this behavior is controlled by UrlValidator.ALLOW_NON_IANA_TLDS option, which is turned off by default). It recognizes hostnames like 'localhost', 'localhost.localdomain', 'aaa', etc. > Add an option to allow 'localhost' as a valid hostname part in the URL > ---------------------------------------------------------------------- > > Key: VALIDATOR-248 > URL: https://issues.apache.org/jira/browse/VALIDATOR-248 > 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 (http://jira.codehaus.org/browse/GRAILS-1692) 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 (http://www.ietf.org/rfc/rfc2396.txt) 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.