Repository: trafficserver Updated Branches: refs/heads/master 84a8c8424 -> 7b6857a27
TS-3065 Remove"Transfer-Encoding" header when the error body was set by ATS (e.g. plugin). Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/79f88d5f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/79f88d5f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/79f88d5f Branch: refs/heads/master Commit: 79f88d5f9d868a46b382ec5f62895b515a143936 Parents: 84a8c84 Author: portl4t <[email protected]> Authored: Wed Nov 19 14:31:26 2014 -0700 Committer: Leif Hedstrom <[email protected]> Committed: Wed Nov 19 14:31:26 2014 -0700 ---------------------------------------------------------------------- proxy/http/HttpSM.cc | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/79f88d5f/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index f46fc77..47092c8 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -5979,6 +5979,7 @@ HttpSM::setup_internal_transfer(HttpSMHandler handler_arg) // Set the content length here since a plugin // may have changed the error body t_state.hdr_info.client_response.set_content_length(t_state.internal_msg_buffer_size); + t_state.hdr_info.client_response.field_delete(MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING); // set internal_msg_buffer_type if available if (t_state.internal_msg_buffer_type) { @@ -6004,6 +6005,7 @@ HttpSM::setup_internal_transfer(HttpSMHandler handler_arg) // Needed for keep-alive on PURGE requests if (!is_response_body_precluded(t_state.hdr_info.client_response.status_get(), t_state.method)) { t_state.hdr_info.client_response.set_content_length(0); + t_state.hdr_info.client_response.field_delete(MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING); } }
