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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1 Release
    • Fix Version/s: 1.4.0 Release
    • Component/s: Routines
    • Labels:
      None
    • Environment:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: