Updated Branches: refs/heads/master c134071e8 -> fc97b3167
TS-2351 Bandaid fix for Range request crash related to Read-While-Writer and content length calculations. This hides a deeper problem where there is a seemingly serious reace condition around Range and partially written cache entries. I'm going to clone TS-2351 for a real investigation / fix. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fc97b316 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fc97b316 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fc97b316 Branch: refs/heads/master Commit: fc97b3167bdd5265ecb8ceac87ee169ada6b6c31 Parents: c134071 Author: Leif Hedstrom <[email protected]> Authored: Thu Nov 28 20:42:46 2013 +0100 Committer: Leif Hedstrom <[email protected]> Committed: Thu Nov 28 20:44:06 2013 +0100 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/http/HttpTransact.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fc97b316/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 78f7103..56ea529 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.2.0 + *) [TS-2351] Bandaid fix for Range request crash related to + Read-While-Writer and content length calculations. *) [TS-2408] Fix double free of proxy.config.admin.user_id. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fc97b316/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 049e672..d6b7605 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -8685,7 +8685,7 @@ HttpTransact::change_response_header_because_of_range_request(State *s, HTTPHdr header->field_attach(field); header->set_content_length(s->range_output_cl); - } else { + } else if (s->cache_info.object_read) { char numbers[RANGE_NUMBERS_LENGTH]; header->field_delete(MIME_FIELD_CONTENT_RANGE, MIME_LEN_CONTENT_RANGE); field = header->field_create(MIME_FIELD_CONTENT_RANGE, MIME_LEN_CONTENT_RANGE);
