Tapestry 5
  1. Tapestry 5
  2. TAP5-1950

ResourceStreamer sends SC_NOT_MODIFIED as an error, but it should be just status


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.4
    • Fix Version/s: 5.3.4, 5.4
    • Component/s: tapestry-core
    • Labels:


      From a client:

      quick side note: currently we use tapestry-spring-security integration for web security. In case a response.sendError(..) is called during the request the spring security filter will create a HttpSession storing the current security context for that error in the http session (default spring configuration behaviour for creating a HttpSession in a error case). This behaviour (currently we rely on that) caused a serious bottleneck for anonymous users as a lot of unnecessary HttpSessions were created and it was bascially triggered through the current ResourceStreamerImpl implementation and the call response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "").

      I contributed my own HttpSessionWorkaroundResourceStreamerImpl implementation were I just replaced the call response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "") with response.setStatus(HttpServletResponse.SC_NOT_MODIFIED) and then we made another big performance jump. So my question: Wouldn't be response.setStatus(HttpServletResponse.SC_NOT_MODIFIED) "more" correct as it isn't an error (3xx<->5xx http codes)?


        Howard M. Lewis Ship created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Summary Not modified HTTP response is just status, not an error, should use correct API ResourceStreamer sends SC_NOT_MODIFIED as an error, but it should be just status
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Howard M. Lewis Ship [ hlship ]
        Fix Version/s 5.3.4 [ 12320774 ]
        Fix Version/s 5.4 [ 12316401 ]
        Resolution Fixed [ 1 ]


          • Assignee:
            Howard M. Lewis Ship
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: