From 946392c230d5fbf31b7456576c0ee423e25bb58f Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 10 Jul 2007 16:12:25 -0300 Subject: Simplified HttpMethod::Fetch on http.cc removing Tail variable; --- methods/http.cc | 4 ---- 1 file changed, 4 deletions(-) (limited to 'methods') diff --git a/methods/http.cc b/methods/http.cc index 3c2d8a36f..506e66fae 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -996,7 +996,6 @@ bool HttpMethod::Fetch(FetchItem *) // Queue the requests int Depth = -1; - bool Tail = false; for (FetchItem *I = Queue; I != 0 && Depth < (signed)PipelineDepth; I = I->Next, Depth++) { @@ -1008,8 +1007,6 @@ bool HttpMethod::Fetch(FetchItem *) if (Server->Comp(I->Uri) == false) break; if (QueueBack == I) - Tail = true; - if (Tail == true) { QueueBack = I->Next; SendReq(I,Server->Out); @@ -1071,7 +1068,6 @@ int HttpMethod::Loop() delete Server; Server = new ServerState(Queue->Uri,this); } - /* If the server has explicitly said this is the last connection then we pre-emptively shut down the pipeline and tear down the connection. This will speed up HTTP/1.0 servers a tad -- cgit v1.2.3 From 9a52beaad9a26454fe627dab3f87ebf08c799677 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Tue, 10 Jul 2007 16:49:12 -0300 Subject: * Fix pipeline handling on http.cc (closes: #413324) --- methods/http.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'methods') diff --git a/methods/http.cc b/methods/http.cc index 506e66fae..068d26978 100644 --- a/methods/http.cc +++ b/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; } -- cgit v1.2.3