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

Problems when calling request.getInputStream() before executing WicketFilter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 10.0.0-M1, 9.14.0
    • 9.15.0, 10.0.0-M2
    • wicket-core
    • None
    • Java 17 or 21-ea; Jetty 11 or Tomcat 10.1.x; Wicket 10.0.0-M1 or 9.3+.

    Description

      Calling request.getInputStream() (without reading any data from the stream), followed by a WicketFilter, causes certain wicket requests to fail.

      If no call to request.getInputStream() is made, everything works as expected.

      See runnable, minimal Maven project here: https://github.com/gluser1357/jerseyissues/tree/issue-4867-wicket10 > readme.txt.

      The issue is always reproducable e. g. in Jetty 11 and Tomcat 10.1.x (Jakarta Servlet 5+).

      A use case for the described filter combination is e. g. to add an existing Jersey-based authorization filter in front of a Wicket application. Since Jersey calls at some point request.getInputStream(), our Wicket application fails at then. See more details on this here: https://github.com/eclipse-ee4j/jersey/issues/4867
       
       

      Attachments

        1. wicket-7071-getParameters.png
          387 kB
          Martin Tzvetanov Grigorov
        2. wicket-7071-first-getInputStream.png
          299 kB
          Martin Tzvetanov Grigorov

        Activity

          People

            Unassigned Unassigned
            gluser1357 Sam Peters
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: