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

Add support for WebSocketRequest#getUrl() and other properties which are available in the handshake request

    XMLWordPrintableJSON

Details

    Description

      During request processing some components can want to access some request parameters, paths, etc. When this is done during web socket request it can lead to IllegalArgumentExceptions, because WebSocketRequest.getUrl() method returns null.

      java.lang.IllegalArgumentException: Argument 'url' may not be null.
          at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
          at
      org.apache.wicket.request.parameter.UrlRequestParametersAdapter.<init>(UrlRequestParametersAdapter.java:48)
          at
      org.apache.wicket.request.Request.getQueryParameters(Request.java:128)
          at
      org.apache.wicket.request.Request.getRequestParameters(Request.java:136)
      

      Maybe these methods should better return empty Url instead of null (
      return new Url(); )?

      Attachments

        1. websocket-errors.zip
          40 kB
          Daniel Stoch

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            interface Daniel Stoch
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: