Replace reponse.commit with response.closeOutput
This commit is contained in:
parent
6cbffcb332
commit
bacff75b31
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue