Преглед изворни кода

* Fix pipeline handling on http.cc (closes: #413324)

Otavio Salvador пре 19 година
родитељ
комит
9a52beaad9
2 измењених фајлова са 19 додато и 1 уклоњено
  1. 1 0
      debian/changelog
  2. 18 1
      methods/http.cc

+ 1 - 0
debian/changelog

@@ -10,6 +10,7 @@ apt (0.7.4) UNRELEASED; urgency=low
       - unused variable;
       - changed SetupProxy() method to void;
   * Simplified HttpMethod::Fetch on http.cc removing Tail variable;
+  * Fix pipeline handling on http.cc (closes: #413324)
 
  -- Otavio Salvador <otavio@ossystems.com.br>  Mon, 02 Jul 2007 13:27:54 -0300
 

+ 18 - 1
methods/http.cc

@@ -1164,8 +1164,25 @@ int HttpMethod::Loop()
 	       URIDone(Res);
 	    }
 	    else
-	       Fail(true);
+		{
+		  if (Server->ServerFd == -1)
+		  {
+			  FailCounter++;
+			  _error->Discard();
+			  Server->Close();
 	    
+			  if (FailCounter >= 2)
+			  {
+				  Fail(_("Connection failed"),true);
+				  FailCounter = 0;
+			  }
+	    
+			  QueueBack = Queue;
+		  }
+		  else
+			  Fail(true);
+		}
+
 	    break;
 	 }