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

Overiding disableCaching in ServletWebResponse is ignored when responce is buffered

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.19.0
    • 6.20.0, 7.0.0-M6
    • wicket
    • None

    Description

      in WebApplication I have

      MyWebApplication.java
      protected WebResponse newWebResponse(final WebRequest webRequest, final HttpServletResponse httpServletResponse) {
      		return new ServletWebResponse((ServletWebRequest) webRequest, httpServletResponse) {
      
      			@Override
      			public void disableCaching() {
      				setDateHeader("Date", Time.now());
      				setDateHeader("Expires", Time.START_OF_UNIX_TIME);
      				setHeader("Cache-Control", "no-store, no-cache");
      			}
      		};
      	}
      

      but i have to disable buffering with:
      getRequestCycleSettings().setBufferResponse(false);

      becouse
      HeaderBufferingWebResponse and BufferedWebResponse doesnt call disableCaching of my WebResponse

      Attachments

        Activity

          People

            svenmeier Sven Meier
            elnino3800 Ľuboš Pittner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: