This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e24c79a Fix KA header not checking strategy (#7483)
e24c79a is described below
commit e24c79a4a530dc9b12880503e8c047e5610c3224
Author: Robert O Butts <[email protected]>
AuthorDate: Thu Feb 25 16:01:45 2021 -0700
Fix KA header not checking strategy (#7483)
Fixes handle_request_keep_alive_headers directly checking the old
parentage for parent_is_proxy, instead of the abstract func which
checks the strategy if it exists.
This would cause the Connection header to get added instead of the
correct Proxy-Connection when Strategies are used.
---
proxy/http/HttpTransact.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 3669169..a8bfd23 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6761,7 +6761,7 @@ HttpTransact::handle_request_keep_alive_headers(State *s,
HTTPVersion ver, HTTPH
case KA_CONNECTION:
ink_assert(s->current.server->keep_alive != HTTP_NO_KEEPALIVE);
if (ver == HTTPVersion(1, 0)) {
- if (s->current.request_to == PARENT_PROXY &&
s->parent_result.parent_is_proxy()) {
+ if (s->current.request_to == PARENT_PROXY && parent_is_proxy(s)) {
heads->value_set(MIME_FIELD_PROXY_CONNECTION,
MIME_LEN_PROXY_CONNECTION, "keep-alive", 10);
} else {
heads->value_set(MIME_FIELD_CONNECTION, MIME_LEN_CONNECTION,
"keep-alive", 10);
@@ -6775,7 +6775,7 @@ HttpTransact::handle_request_keep_alive_headers(State *s,
HTTPVersion ver, HTTPH
if (s->current.server->keep_alive != HTTP_NO_KEEPALIVE || (ver ==
HTTPVersion(1, 1))) {
/* Had keep-alive */
s->current.server->keep_alive = HTTP_NO_KEEPALIVE;
- if (s->current.request_to == PARENT_PROXY &&
s->parent_result.parent_is_proxy()) {
+ if (s->current.request_to == PARENT_PROXY && parent_is_proxy(s)) {
heads->value_set(MIME_FIELD_PROXY_CONNECTION,
MIME_LEN_PROXY_CONNECTION, "close", 5);
} else {
heads->value_set(MIME_FIELD_CONNECTION, MIME_LEN_CONNECTION,
"close", 5);