Don't try to generate error page if the response has already been committed.
This commit is contained in:
parent
3cd206effc
commit
9ddc2a6f83
1 changed files with 3 additions and 0 deletions
|
@ -362,6 +362,9 @@ public abstract class AbstractServletClient extends HttpServlet {
|
||||||
|
|
||||||
void sendError(HttpServletResponse response, int code, String message)
|
void sendError(HttpServletResponse response, int code, String message)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if (response.isCommitted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
response.reset();
|
response.reset();
|
||||||
response.setStatus(code);
|
response.setStatus(code);
|
||||||
response.setContentType("text/html");
|
response.setContentType("text/html");
|
||||||
|
|
Loading…
Add table
Reference in a new issue