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

NPE with RequestLogger enabled and Https

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC5.1
    • 1.5-RC6
    • wicket
    • None

    Description

      There is a wicket application with https enabled:

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

      The RequestLogger is also enabled:

      getRequestLoggerSettings().setRequestLoggerEnabled(true);

      The bug can be reproduced by:
      1. Try to access the page with "localhost/h" (deliberately excluding the https protocol prefix).
      2. A NPE is thrown:

      java.lang.NullPointerException
      at org.apache.wicket.protocol.http.RequestLogger.getRequestHandlerString(RequestLogger.java:532)
      at org.apache.wicket.protocol.http.RequestLogger.getDelegateString(RequestLogger.java:574)
      at org.apache.wicket.protocol.http.RequestLogger.getRequestHandlerString(RequestLogger.java:556)
      at org.apache.wicket.protocol.http.RequestLogger.logEventTarget(RequestLogger.java:513)
      at org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener.registerHandler(RequestLoggerRequestCycleListener.java:119)
      at org.apache.wicket.protocol.http.RequestLoggerRequestCycleListener.onRequestHandlerResolved(RequestLoggerRequestCycleListener.java:64)

      Attachments

        1. quickstart.rar
          8 kB
          Ivan Vasilev

        Activity

          People

            svenmeier Sven Meier
            hok Ivan Vasilev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: