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

Wicket 1.5.6 duplicates segments in absolute URLs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.5.7, 6.0.0-beta3
    • Component/s: wicket
    • Labels:
      None

      Description

      Since we migrate our application to Wicket 1.5.6 some URLs from BookmarkablePageLinks have duplicate segements for indicating a Shop and a Language item from our persistence model. For indicating a Shop and Language item we use our own ShopMapper and LanguageMapper (subclass of AbstractComponentMapper). This was working until we migrate to 1.5.6.
      For instance ...

      correct URL: host/servlet/shop/en/page
      wrong URL: host/servlet/shop/en/shop/en/page

      This happens, for example, when the protocol of the linked URL is different from the current protocol (http/https). So, basically, all links that point to pages that are annotated with @RequireHttps are wrong.

      In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:

      setRootRequestMapper(new HttpsMapper(new ShopMapper(new LanguageMapper(getRootRequestMapper())), new HttpsConfig() ) );

      Using a debugger, I've tracked down the spot where wrong URL is rendered:

      org.apache.wicket.request.Url.resolveRelative()

        Attachments

        1. quickstart.zip
          40 kB
          Martin Tzvetanov Grigorov

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Tzvetanov Grigorov
                Reporter:
                forchel Dirk Forchel
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: