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

NPE in WebClientInfo when user-agent header is not sent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.6, 1.3.0-beta1
    • 1.2.6, 1.3.0-beta1
    • wicket
    • None

    Description

      When the user agent http header is not set, the webclientinfo will throw either a NPE or a WicketRuntimeException (depending on the constructor called). This is not handy as the header can be omitted by clients.

      In a discussion on @dev Eelco said:

      I guess I was wrong in expecting a user agent header would always be
      avaible. So WebClientInfo should accept null, and then in init() do
      nothing.

      Another thing I'm wondering is whether this is a quirk, or whether you
      can expect a client that doesn't send a user-agent header to never
      send it. Cause if is a quirk, and does send it with a next request, we
      might want to try to reconstruct the WebClientInfo object. That's a
      bit more complicated to achieve but doable. We just need to decide if
      that's the best way to go.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dashorst Martijn Dashorst
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: