You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2015/03/23 13:34:11 UTC

[jira] [Commented] (WICKET-5863) Overiding disableCaching in ServletWebResponse is ignored when responce is buffered

    [ https://issues.apache.org/jira/browse/WICKET-5863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14375848#comment-14375848 ] 

Sven Meier commented on WICKET-5863:
------------------------------------

WebResponse#disabledCaching() already sets these headers, as your custom subclass. HeaderBufferingWebResponse and BufferedWebResponse both inherit this method from WebResponse, so it's not clear to me what problem you're trying to solve.

Please try to explain again or provide a quickstart.

> Overiding disableCaching in ServletWebResponse is ignored when responce is buffered
> -----------------------------------------------------------------------------------
>
>                 Key: WICKET-5863
>                 URL: https://issues.apache.org/jira/browse/WICKET-5863
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.19.0
>            Reporter: Ľuboš Pittner
>
> in WebApplication I have
> {code:title=MyWebApplication.java|borderStyle=solid}
> 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");
> 			}
> 		};
> 	}
> {code}
> but i have to disable buffering with:
> getRequestCycleSettings().setBufferResponse(false);
> becouse
> HeaderBufferingWebResponse and BufferedWebResponse doesnt call disableCaching of my WebResponse



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)