X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2FHTTPRequest.cxx;h=6b06785ad00bf57d79fb12e77b971a9475362138;hb=72bb9f4d5d6d861902a5779381e4ebe977db1df1;hp=c9d82d29bac131c320604cd3139ba8f40f0068a0;hpb=714a6ac47dc87f5d8d873644b8dfff05277726ec;p=simgear.git diff --git a/simgear/io/HTTPRequest.cxx b/simgear/io/HTTPRequest.cxx index c9d82d29..6b06785a 100644 --- a/simgear/io/HTTPRequest.cxx +++ b/simgear/io/HTTPRequest.cxx @@ -32,6 +32,7 @@ extern const int DEFAULT_HTTP_PORT; //------------------------------------------------------------------------------ Request::Request(const std::string& url, const std::string method): + _client(0), _method(method), _url(url), _responseVersion(HTTP_VERSION_UNKNOWN), @@ -365,23 +366,17 @@ void Request::setReadyState(ReadyState state) } //------------------------------------------------------------------------------ -void Request::abort() -{ - abort("Request aborted."); -} - -//---------------------------------------------------------------------------- -void Request::abort(const std::string& reason) +bool Request::closeAfterComplete() const { - setFailure(-1, reason); - _willClose = true; + // for non HTTP/1.1 connections, assume server closes + return _willClose || (_responseVersion != HTTP_1_1); } //------------------------------------------------------------------------------ -bool Request::closeAfterComplete() const + +void Request::setCloseAfterComplete() { - // for non HTTP/1.1 connections, assume server closes - return _willClose || (_responseVersion != HTTP_1_1); + _willClose = true; } //------------------------------------------------------------------------------