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())
|
if (!_response.isCommitted() && !_request.isHandled())
|
||||||
_response.sendError(404);
|
_response.sendError(404);
|
||||||
|
else
|
||||||
// Complete generating the response
|
// Complete generating the response
|
||||||
_response.complete();
|
_response.closeOutput();
|
||||||
}
|
}
|
||||||
catch(EofException e)
|
catch(EofException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -436,7 +436,7 @@ public class Response implements HttpServletResponse
|
||||||
_mimeType=null;
|
_mimeType=null;
|
||||||
}
|
}
|
||||||
|
|
||||||
complete();
|
closeOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -516,7 +516,7 @@ public class Response implements HttpServletResponse
|
||||||
resetBuffer();
|
resetBuffer();
|
||||||
setHeader(HttpHeader.LOCATION, location);
|
setHeader(HttpHeader.LOCATION, location);
|
||||||
setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
|
setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
|
||||||
complete();
|
closeOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -792,6 +792,7 @@ public class Response implements HttpServletResponse
|
||||||
getOutputStream().close();
|
getOutputStream().close();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
_out.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1062,11 +1063,6 @@ public class Response implements HttpServletResponse
|
||||||
return _reason;
|
return _reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void complete()
|
|
||||||
{
|
|
||||||
_out.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public HttpFields getHttpFields()
|
public HttpFields getHttpFields()
|
||||||
{
|
{
|
||||||
return _fields;
|
return _fields;
|
||||||
|
|
|
@ -459,7 +459,7 @@ public class Server extends HandlerWrapper implements Attributes
|
||||||
response.setStatus(200);
|
response.setStatus(200);
|
||||||
response.getHttpFields().put(HttpHeader.ALLOW,"GET,POST,HEAD,OPTIONS");
|
response.getHttpFields().put(HttpHeader.ALLOW,"GET,POST,HEAD,OPTIONS");
|
||||||
response.setContentLength(0);
|
response.setContentLength(0);
|
||||||
response.complete();
|
response.closeOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
Loading…
Reference in New Issue