Repository: trafficserver Updated Branches: refs/heads/master c26e015e4 -> aa4a9e86e
TS-3098: Fix the ability to configure keep-alive on post to the origin Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/aa4a9e86 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/aa4a9e86 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/aa4a9e86 Branch: refs/heads/master Commit: aa4a9e86e22a99b1c157269a4e8ff9a0dbf75dc3 Parents: c26e015 Author: Bryan Call <[email protected]> Authored: Thu Sep 25 18:51:33 2014 -0700 Committer: Bryan Call <[email protected]> Committed: Thu Sep 25 18:51:33 2014 -0700 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/http/HttpConfig.cc | 1 + proxy/http/HttpSM.cc | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aa4a9e86/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 27efe80..4719eec 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.2.0 + *) [TS-3098] Fix the ability to configure keep-alive on post to the origin + *) [TS-3085] Large POSTs over (relatively) slower connections failing *) [TS-3092] Set SSL CTX timeout regardless of Session Cache http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aa4a9e86/proxy/http/HttpConfig.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index 2bd57c8..db66e83 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -1562,6 +1562,7 @@ HttpConfig::reconfigure() // params->oride.share_server_sessions = m_master.oride.share_server_sessions; params->oride.server_session_sharing_pool = m_master.oride.server_session_sharing_pool; params->oride.server_session_sharing_match = m_master.oride.server_session_sharing_match; + params->oride.keep_alive_post_out = m_master.oride.keep_alive_post_out; params->oride.keep_alive_no_activity_timeout_in = m_master.oride.keep_alive_no_activity_timeout_in; params->oride.keep_alive_no_activity_timeout_out = m_master.oride.keep_alive_no_activity_timeout_out; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/aa4a9e86/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 5b3f5f1..fa1a2a4 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3366,13 +3366,6 @@ HttpSM::tunnel_handler_post_ua(int event, HttpTunnelProducer * p) ua_entry->write_buffer = NULL; } - // Completed successfully - if (t_state.txn_conf->keep_alive_post_out == 0) { - // don't share the session if keep-alive for post is not on - DebugSM("http_ss", "Setting server session to private because of keep-alive post out"); - set_server_session_private(true); - } - p->handler_state = HTTP_SM_POST_SUCCESS; p->read_success = true; ua_entry->in_tunnel = false; @@ -5623,6 +5616,13 @@ HttpSM::attach_server_session(HttpServerSession * s) if (t_state.method == HTTP_WKSIDX_POST || t_state.method == HTTP_WKSIDX_PUT) { connect_timeout = t_state.txn_conf->post_connect_attempts_timeout; + + // don't share the session if keep-alive for post is not on + if (t_state.txn_conf->keep_alive_post_out == 0) { + DebugSM("http_ss", "Setting server session to private because of keep-alive post out"); + set_server_session_private(true); + } + } else if (t_state.current.server == &t_state.parent_info) { connect_timeout = t_state.http_config_param->parent_connect_timeout; } else { @@ -5645,7 +5645,7 @@ HttpSM::attach_server_session(HttpServerSession * s) if (plugin_tunnel_type != HTTP_NO_PLUGIN_TUNNEL) { DebugSM("http_ss", "Setting server session to private"); - server_session->private_session = true; + set_server_session_private(true); } } @@ -5691,8 +5691,8 @@ HttpSM::setup_server_send_request() // If we are sending authorizations headers, mark the connection private if (t_state.txn_conf->auth_server_session_private == 1 && t_state.hdr_info.server_request.presence(MIME_PRESENCE_AUTHORIZATION | MIME_PRESENCE_PROXY_AUTHORIZATION | MIME_PRESENCE_WWW_AUTHENTICATE)) { - server_session->private_session = true; - DebugSM("http_ss", "Setting server session to private for authorization header"); + DebugSM("http_ss", "Setting server session to private for authorization header"); + set_server_session_private(true); } milestones.server_begin_write = ink_get_hrtime(); server_entry->write_vio = server_entry->vc->do_io_write(this, hdr_length, buf_start);
