Replace reponse.commit with response.closeOutput

This commit is contained in:
Greg Wilkins 2013-06-04 10:51:49 +10:00
parent 6cbffcb332
commit bacff75b31
3 changed files with 7 additions and 11 deletions

View File

@ -318,9 +318,9 @@ public class HttpChannel<T> implements HttpParser.RequestHandler<T>, Runnable
if (!_response.isCommitted() && !_request.isHandled())
_response.sendError(404);
else
// Complete generating the response
_response.complete();
_response.closeOutput();
}
catch(EofException e)
{

View File

@ -436,7 +436,7 @@ public class Response implements HttpServletResponse
_mimeType=null;
}
complete();
closeOutput();
}
/**
@ -516,7 +516,7 @@ public class Response implements HttpServletResponse
resetBuffer();
setHeader(HttpHeader.LOCATION, location);
setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
complete();
closeOutput();
}
@Override
@ -792,6 +792,7 @@ public class Response implements HttpServletResponse
getOutputStream().close();
break;
default:
_out.close();
}
}
@ -1062,11 +1063,6 @@ public class Response implements HttpServletResponse
return _reason;
}
public void complete()
{
_out.close();
}
public HttpFields getHttpFields()
{
return _fields;

View File

@ -459,7 +459,7 @@ public class Server extends HandlerWrapper implements Attributes
response.setStatus(200);
response.getHttpFields().put(HttpHeader.ALLOW,"GET,POST,HEAD,OPTIONS");
response.setContentLength(0);
response.complete();
response.closeOutput();
}
/* ------------------------------------------------------------ */