]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/HTTPRequest.cxx
Don't use object returned from vector::end()
[simgear.git] / simgear / io / HTTPRequest.cxx
index c9d82d29bac131c320604cd3139ba8f40f0068a0..6b06785ad00bf57d79fb12e77b971a9475362138 100644 (file)
@@ -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;
 }
 
 //------------------------------------------------------------------------------