]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/HTTPRequest.cxx
SGPath: fix creating paths with permission checker.
[simgear.git] / simgear / io / HTTPRequest.cxx
index 535ec402da8fa9c043ded3de7f9f7e0d0238fa63..900b7fc29f9178ea9d2a572752e8af0b2bbe9bc5 100644 (file)
@@ -304,7 +304,9 @@ void Request::setFailure(int code, const std::string& reason)
 {
   _responseStatus = code;
   _responseReason = reason;
-  setReadyState(FAILED);
+
+  if( !isComplete() )
+    setReadyState(FAILED);
 }
 
 //------------------------------------------------------------------------------
@@ -346,9 +348,6 @@ void Request::abort()
 //----------------------------------------------------------------------------
 void Request::abort(const std::string& reason)
 {
-  if( isComplete() )
-    return;
-
   setFailure(-1, reason);
   _willClose = true;
 }