HTTP request cancellation
- replaces abort() with something more structured.
This commit is contained in:
@@ -365,19 +365,6 @@ void Request::setReadyState(ReadyState state)
|
||||
_cb_always(this);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void Request::abort()
|
||||
{
|
||||
abort("Request aborted.");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void Request::abort(const std::string& reason)
|
||||
{
|
||||
setFailure(-1, reason);
|
||||
_willClose = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Request::closeAfterComplete() const
|
||||
{
|
||||
@@ -385,6 +372,13 @@ bool Request::closeAfterComplete() const
|
||||
return _willClose || (_responseVersion != HTTP_1_1);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
void Request::setCloseAfterComplete()
|
||||
{
|
||||
_willClose = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Request::serverSupportsPipelining() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user