XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 4.0.1, 4.0.2, 4.0.3, 4.1 Alpha1, 4.1 Alpha2, 4.1 Beta1
    • None
    • HttpClient (classic)
    • None

    Description

      in BasicPathHandler

      boolean match = targetpath.startsWith (topmostPath);
      // if there is a match and these values are not exactly the same we have
      // to make sure we're not matcing "/foobar" and "/foo"
      if (match && targetpath.length() != topmostPath.length()) {
      if (!topmostPath.endsWith("/"))

      { match = (targetpath.charAt(topmostPath.length()) == '/'); }

      }

      must be changed to

      boolean match = topmostPath.startsWith (targetpath);
      // if there is a match and these values are not exactly the same we have
      // to make sure we're not matcing "/foobar" and "/foo"
      if (match && targetpath.length() != topmostPath.length()) {
      if (!targetPath.endsWith("/"))

      { match = (topmostPath.charAt(targetpath.length()-1) == '/'); }

      }

      example

      targetpath = "/stat/" // where are you
      topmostPath = "/stat/domain.tld/" // cookie for path

      Attachments

        Activity

          People

            Unassigned Unassigned
            dgreen Dmitry Grytsovets
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: