HTTP request cancellation

- replaces abort() with something more structured.
This commit is contained in:
James Turner
2016-04-14 09:16:36 +01:00
parent 493aab8bab
commit a3f1bb546f
10 changed files with 204 additions and 48 deletions
+7 -13
View File
@@ -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
{