Hi, Yes, this looks strange. I think it is OK to remove it. Additionally I think setContentType() should be moved above getWriter().write(): https://github.com/apache/wicket/blob/bdaeef3de34320bf1111d0402cab04926d59e4cd/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java#L284 Usually headers should be written before the body. This works because of the buffering we do, but will probably fail with buffering disabled.
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Aug 21, 2015 at 10:07 AM, Emond Papegaaij < [email protected]> wrote: > Hi, > > I just noticed that ServletWebResponse.sendRedirect calls disableCaching > twice. The second call was explicitly added in > ea295d44bbc7e8455b6f70c70cc2aebb4ff16664 for WICKET-3921. However, at that > time, the first call was already there. I do not see how this change could > have made any difference. After removing the second call, all tests in > AjaxRequestHandlerTest still pass. Should we just remove it? > > Best regards, > Emond >
