Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-218

UrlValidator fail when path contains "(" / ")"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.1 Release
    • 1.4.0 Release
    • Routines
    • None
    • JDK 1.5, Linux

    Description

      for validating the URL "http://somewhere.com/pathxyz/file(1).html", it returns false.

      According to the RFC,
      uric = reserved | unreserved | escaped
      reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
      "$" | ","
      unreserved = alphanum | mark
      mark = "-" | "_" | "." | "!" | "~" | "*" | "'" |
      "(" | ")"

      "(", ")" belongs to mark and is a valid part of uric.

      Test case:

      UrlValidator validator = new UrlValidator(

      {"http","https"}

      , UrlValidator.ALLOW_2_SLASHES);
      validator.isValid("http://somewhere.com/pathxyz/file(1).html");

      Attachments

        Issue Links

          Activity

            People

              niallp Niall Pemberton
              standbychu Stephen Chu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: