This is an automated email from the ASF dual-hosted git repository. papegaaij pushed a commit to branch wicket-6831 in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 0c53d035d6cc433a83e6117700944130a109bf1b Author: Emond Papegaaij <[email protected]> AuthorDate: Wed Sep 16 16:33:15 2020 +0200 WICKET-6831: flush the request before detaching to allow the browser to move on --- .../org/apache/wicket/protocol/http/WicketFilter.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java index fb3ee46..ef90b10 100644 --- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java +++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java @@ -272,12 +272,21 @@ public class WicketFilter implements Filter { // Assume we are able to handle the request boolean res = true; - - if (requestCycle.processRequestAndDetach()) + boolean reqProcessed = false; + try { - webResponse.flush(); + reqProcessed = requestCycle.processRequest(); + if (reqProcessed) + { + webResponse.flush(); + } } - else + finally + { + requestCycle.detach(); + } + + if (!reqProcessed) { if (chain != null) {
