Don't try to generate error page if the response has already been committed.

This commit is contained in:
hns 2009-11-26 10:24:15 +00:00
parent 3cd206effc
commit 9ddc2a6f83

View file

@ -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");