Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1836

RequestUtils.toAbsolutePath() should handle dot paths in the url

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4-M3
    • 1.4-RC1
    • wicket
    • None
    • linux jetty

    Description

      String path = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(HomePage.class, new PageParameters()).toString());

      if HomePage is mounted to / the url will be http://host/./ and should instead be http://host/
      only double dots are translated, single dots should be removed

      Some other remarks:

      the implementation is using StringBuffer, that could be changed to StringBuilder.
      toAbsolutepath should accept CharSequence instead of String (that will remove the need for the .toString() in the above sample

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            francisdb Francis De Brabandere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: