Repository: trafficserver Updated Branches: refs/heads/master a4dd966ad -> 974a8a9bb
TS-2705 Make the background fill check more robust. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/974a8a9b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/974a8a9b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/974a8a9b Branch: refs/heads/master Commit: 974a8a9bbbc2ba22cdbdc3b011a6e926ff78a8f1 Parents: a4dd966 Author: Alan M. Carroll <[email protected]> Authored: Tue May 20 21:13:58 2014 -0500 Committer: Alan M. Carroll <[email protected]> Committed: Tue May 20 21:13:58 2014 -0500 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/http/HttpSM.cc | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/974a8a9b/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 87fd89d..851f232 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.0.0 + *) [TS-2705] Make the background fill check more robust. + *) [TS-1411] Seg fault when using %<cquuc> *) [TS-2739] ATS doesn't send back Transfer-Encoding when client keep-alive http://git-wip-us.apache.org/repos/asf/trafficserver/blob/974a8a9b/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 43b56bc..10a81eb 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -2943,11 +2943,10 @@ HttpSM::is_bg_fill_necessary(HttpTunnelConsumer * c) { ink_assert(c->vc_type == HT_HTTP_CLIENT); - // There must be another consumer for it to worthwhile to - // set up a background fill - if (((c->producer->num_consumers > 1 && c->producer->vc_type == HT_HTTP_SERVER) || - (c->producer->num_consumers > 1 && c->producer->vc_type == HT_TRANSFORM)) && - c->producer->alive == true) { + if (c->producer->alive && // something there to read + server_entry && server_entry->vc && // from an origin server + c->producer->num_consumers > 1 // with someone else reading it + ) { // If threshold is 0.0 or negative then do background // fill regardless of the content length. Since this
