Skip to content

Commit

Permalink
fix JENKINS-58419 since 1.78, CAS: No redirect after login (should no…
Browse files Browse the repository at this point in the history
…t flush buffer when no content)
  • Loading branch information
evernat committed Jul 25, 2019
1 parent 29b8e30 commit 068775a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -238,7 +238,7 @@ private void doFilter(FilterChain chain, HttpServletRequest httpRequest,
CounterError.bindRequest(httpRequest);
chain.doFilter(wrappedRequest, wrappedResponse);
if (servletApi2 || !httpRequest.isAsyncStarted()) {
wrappedResponse.flushBuffer();
wrappedResponse.flushStream();
}
} catch (final Throwable t) { // NOPMD
// on catche Throwable pour avoir tous les cas d'erreur système
Expand Down
Expand Up @@ -162,6 +162,14 @@ public void flushBuffer() throws IOException {
}
}

public void flushStream() throws IOException {
if (writer != null) {
writer.flush();
} else if (stream != null) {
stream.flush();
}
}

/**
* Ferme le flux.
* @throws IOException e
Expand Down

0 comments on commit 068775a

Please sign in to comment.