You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2016/05/06 03:29:05 UTC

[trafficserver] branch master updated (6136d8b -> d59ee2b)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git.

      from  6136d8b   Fix unexpected indentation in gzip.en.rst.
       new  42e4b20   TS-4401 Fix clang-format indentation
       new  1f71d17   TS-4401 Cleanup of the overridable switch statement
       new  ea4f7e2   TS-4401 Override proxy.config.http.uncacheable_requests_bypass_parent
       new  d59ee2b   TS-4401 Override proxy.config.http.parent_proxy.total_connect_attempts

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/admin-guide/files/records.config.en.rst      |   3 +
 lib/ts/apidefs.h.in                              |   2 +
 plugins/experimental/ts_lua/ts_lua_http_config.c | 202 ++++++++++++-----------
 proxy/InkAPI.cc                                  |  60 ++++---
 proxy/InkAPITest.cc                              | 198 +++++++++++-----------
 proxy/http/HttpConfig.cc                         |   8 +-
 proxy/http/HttpConfig.h                          |  56 +++----
 proxy/http/HttpTransact.cc                       |   4 +-
 8 files changed, 281 insertions(+), 252 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 01/04: TS-4401 Fix clang-format indentation

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 42e4b201cf58ec946dd9ed5f6da2d0f50403a746
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sat Apr 30 12:10:09 2016 -0600

    TS-4401 Fix clang-format indentation
---
 plugins/experimental/ts_lua/ts_lua_http_config.c | 198 ++++++++++++-----------
 proxy/InkAPITest.cc                              | 196 +++++++++++-----------
 2 files changed, 199 insertions(+), 195 deletions(-)

diff --git a/plugins/experimental/ts_lua/ts_lua_http_config.c b/plugins/experimental/ts_lua/ts_lua_http_config.c
index 31abb1e..952af54 100644
--- a/plugins/experimental/ts_lua/ts_lua_http_config.c
+++ b/plugins/experimental/ts_lua/ts_lua_http_config.c
@@ -126,104 +126,106 @@ typedef enum {
   TS_LUA_TIMEOUT_NO_ACTIVITY = 3
 } TSLuaTimeoutKey;
 
-ts_lua_var_item ts_lua_http_config_vars[] = {TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_URL_REMAP_PRISTINE_HOST_HDR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CHUNKING_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_POST_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCH),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_OPTION_FLAG_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SERVER_TCP_INIT_CWND),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SEND_HTTP11_REQUESTS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HTTP),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CLUSTER_CACHE_LOCAL),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_REQUIRED_HEADERS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_REQUEST_VIA_STR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_STALE_AGE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_TIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_STR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_MARK_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_TOS_OUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_AGE_IN_RESPONSE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CHUNKING_SIZE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARK),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_RANGE_LOOKUP),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NORMALIZE_AE_GZIP),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DEFAULT_BUFFER_SIZE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARK),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ACCEPT_ENCODING_FILTER_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_SSL_HSTS_MAX_AGE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_RANGE_WRITE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLED),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADER),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SLOW_LOG_THRESHOLD),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GENERATION),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_BODY_FACTORY_TEMPLATE_BASE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ENABLE_REDIRECTION),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NUMBER_OF_REDIRECTIONS),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT),
-                                             TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_LAST_ENTRY)};
+ts_lua_var_item ts_lua_http_config_vars[] = {
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_URL_REMAP_PRISTINE_HOST_HDR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CHUNKING_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_POST_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCH),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_OPTION_FLAG_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SERVER_TCP_INIT_CWND),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SEND_HTTP11_REQUESTS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HTTP),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CLUSTER_CACHE_LOCAL),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_REQUIRED_HEADERS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_REQUEST_VIA_STR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_STALE_AGE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_TIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_SERVER_STR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_MARK_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_NET_SOCK_PACKET_TOS_OUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_INSERT_AGE_IN_RESPONSE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CHUNKING_SIZE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARK),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_RANGE_LOOKUP),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NORMALIZE_AE_GZIP),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DEFAULT_BUFFER_SIZE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARK),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ACCEPT_ENCODING_FILTER_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_SSL_HSTS_MAX_AGE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_RANGE_WRITE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLED),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADER),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_SLOW_LOG_THRESHOLD),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_GENERATION),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_BODY_FACTORY_TEMPLATE_BASE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ENABLE_REDIRECTION),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_NUMBER_OF_REDIRECTIONS),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_LAST_ENTRY),
+};
 
 // Needed to make sure we have the latest list of overridable http config vars when compiling
 #define NUM_HTTP_CONFIG_VARS (sizeof(ts_lua_http_config_vars) / sizeof(ts_lua_http_config_vars[0]))
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index e635219..4445e47 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -7255,103 +7255,105 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttpConnectServerIntercept)(RegressionTest *
 ////////////////////////////////////////////////
 
 // The order of these should be the same as TSOverridableConfigKey
-const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = {"proxy.config.url_remap.pristine_host_hdr",
-                                                             "proxy.config.http.chunking_enabled",
-                                                             "proxy.config.http.negative_caching_enabled",
-                                                             "proxy.config.http.negative_caching_lifetime",
-                                                             "proxy.config.http.cache.when_to_revalidate",
-                                                             "proxy.config.http.keep_alive_enabled_in",
-                                                             "proxy.config.http.keep_alive_enabled_out",
-                                                             "proxy.config.http.keep_alive_post_out",
-                                                             "proxy.config.http.server_session_sharing.match",
-                                                             "proxy.config.net.sock_recv_buffer_size_out",
-                                                             "proxy.config.net.sock_send_buffer_size_out",
-                                                             "proxy.config.net.sock_option_flag_out",
-                                                             "proxy.config.http.forward.proxy_auth_to_parent",
-                                                             "proxy.config.http.anonymize_remove_from",
-                                                             "proxy.config.http.anonymize_remove_referer",
-                                                             "proxy.config.http.anonymize_remove_user_agent",
-                                                             "proxy.config.http.anonymize_remove_cookie",
-                                                             "proxy.config.http.anonymize_remove_client_ip",
-                                                             "proxy.config.http.anonymize_insert_client_ip",
-                                                             "proxy.config.http.response_server_enabled",
-                                                             "proxy.config.http.insert_squid_x_forwarded_for",
-                                                             "proxy.config.http.server_tcp_init_cwnd",
-                                                             "proxy.config.http.send_http11_requests",
-                                                             "proxy.config.http.cache.http",
-                                                             "proxy.config.http.cache.cluster_cache_local",
-                                                             "proxy.config.http.cache.ignore_client_no_cache",
-                                                             "proxy.config.http.cache.ignore_client_cc_max_age",
-                                                             "proxy.config.http.cache.ims_on_client_no_cache",
-                                                             "proxy.config.http.cache.ignore_server_no_cache",
-                                                             "proxy.config.http.cache.cache_responses_to_cookies",
-                                                             "proxy.config.http.cache.ignore_authentication",
-                                                             "proxy.config.http.cache.cache_urls_that_look_dynamic",
-                                                             "proxy.config.http.cache.required_headers",
-                                                             "proxy.config.http.insert_request_via_str",
-                                                             "proxy.config.http.insert_response_via_str",
-                                                             "proxy.config.http.cache.heuristic_min_lifetime",
-                                                             "proxy.config.http.cache.heuristic_max_lifetime",
-                                                             "proxy.config.http.cache.guaranteed_min_lifetime",
-                                                             "proxy.config.http.cache.guaranteed_max_lifetime",
-                                                             "proxy.config.http.cache.max_stale_age",
-                                                             "proxy.config.http.keep_alive_no_activity_timeout_in",
-                                                             "proxy.config.http.keep_alive_no_activity_timeout_out",
-                                                             "proxy.config.http.transaction_no_activity_timeout_in",
-                                                             "proxy.config.http.transaction_no_activity_timeout_out",
-                                                             "proxy.config.http.transaction_active_timeout_out",
-                                                             "proxy.config.http.origin_max_connections",
-                                                             "proxy.config.http.connect_attempts_max_retries",
-                                                             "proxy.config.http.connect_attempts_max_retries_dead_server",
-                                                             "proxy.config.http.connect_attempts_rr_retries",
-                                                             "proxy.config.http.connect_attempts_timeout",
-                                                             "proxy.config.http.post_connect_attempts_timeout",
-                                                             "proxy.config.http.down_server.cache_time",
-                                                             "proxy.config.http.down_server.abort_threshold",
-                                                             "proxy.config.http.cache.fuzz.time",
-                                                             "proxy.config.http.cache.fuzz.min_time",
-                                                             "proxy.config.http.doc_in_cache_skip_dns",
-                                                             "proxy.config.http.background_fill_active_timeout",
-                                                             "proxy.config.http.response_server_str",
-                                                             "proxy.config.http.cache.heuristic_lm_factor",
-                                                             "proxy.config.http.cache.fuzz.probability",
-                                                             "proxy.config.http.background_fill_completed_threshold",
-                                                             "proxy.config.net.sock_packet_mark_out",
-                                                             "proxy.config.net.sock_packet_tos_out",
-                                                             "proxy.config.http.insert_age_in_response",
-                                                             "proxy.config.http.chunking.size",
-                                                             "proxy.config.http.flow_control.enabled",
-                                                             "proxy.config.http.flow_control.low_water",
-                                                             "proxy.config.http.flow_control.high_water",
-                                                             "proxy.config.http.cache.range.lookup",
-                                                             "proxy.config.http.normalize_ae_gzip",
-                                                             "proxy.config.http.default_buffer_size",
-                                                             "proxy.config.http.default_buffer_water_mark",
-                                                             "proxy.config.http.request_header_max_size",
-                                                             "proxy.config.http.response_header_max_size",
-                                                             "proxy.config.http.negative_revalidating_enabled",
-                                                             "proxy.config.http.negative_revalidating_lifetime",
-                                                             "proxy.config.http.accept_encoding_filter_enabled",
-                                                             "proxy.config.ssl.hsts_max_age",
-                                                             "proxy.config.ssl.hsts_include_subdomains",
-                                                             "proxy.config.http.cache.open_read_retry_time",
-                                                             "proxy.config.http.cache.max_open_read_retries",
-                                                             "proxy.config.http.cache.range.write",
-                                                             "proxy.config.http.post.check.content_length.enabled",
-                                                             "proxy.config.http.global_user_agent_header",
-                                                             "proxy.config.http.auth_server_session_private",
-                                                             "proxy.config.http.slow.log.threshold",
-                                                             "proxy.config.http.cache.generation",
-                                                             "proxy.config.body_factory.template_base",
-                                                             "proxy.config.http.cache.open_write_fail_action",
-                                                             "proxy.config.http.redirection_enabled",
-                                                             "proxy.config.http.number_of_redirections",
-                                                             "proxy.config.http.cache.max_open_write_retries",
-                                                             "proxy.config.http.redirect_use_orig_cache_key",
-                                                             "proxy.config.http.attach_server_session_to_client",
-                                                             "proxy.config.http.origin_max_connections_queue",
-                                                             "proxy.config.websocket.no_activity_timeout",
-                                                             "proxy.config.websocket.active_timeout"};
+const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = {
+  "proxy.config.url_remap.pristine_host_hdr",
+  "proxy.config.http.chunking_enabled",
+  "proxy.config.http.negative_caching_enabled",
+  "proxy.config.http.negative_caching_lifetime",
+  "proxy.config.http.cache.when_to_revalidate",
+  "proxy.config.http.keep_alive_enabled_in",
+  "proxy.config.http.keep_alive_enabled_out",
+  "proxy.config.http.keep_alive_post_out",
+  "proxy.config.http.server_session_sharing.match",
+  "proxy.config.net.sock_recv_buffer_size_out",
+  "proxy.config.net.sock_send_buffer_size_out",
+  "proxy.config.net.sock_option_flag_out",
+  "proxy.config.http.forward.proxy_auth_to_parent",
+  "proxy.config.http.anonymize_remove_from",
+  "proxy.config.http.anonymize_remove_referer",
+  "proxy.config.http.anonymize_remove_user_agent",
+  "proxy.config.http.anonymize_remove_cookie",
+  "proxy.config.http.anonymize_remove_client_ip",
+  "proxy.config.http.anonymize_insert_client_ip",
+  "proxy.config.http.response_server_enabled",
+  "proxy.config.http.insert_squid_x_forwarded_for",
+  "proxy.config.http.server_tcp_init_cwnd",
+  "proxy.config.http.send_http11_requests",
+  "proxy.config.http.cache.http",
+  "proxy.config.http.cache.cluster_cache_local",
+  "proxy.config.http.cache.ignore_client_no_cache",
+  "proxy.config.http.cache.ignore_client_cc_max_age",
+  "proxy.config.http.cache.ims_on_client_no_cache",
+  "proxy.config.http.cache.ignore_server_no_cache",
+  "proxy.config.http.cache.cache_responses_to_cookies",
+  "proxy.config.http.cache.ignore_authentication",
+  "proxy.config.http.cache.cache_urls_that_look_dynamic",
+  "proxy.config.http.cache.required_headers",
+  "proxy.config.http.insert_request_via_str",
+  "proxy.config.http.insert_response_via_str",
+  "proxy.config.http.cache.heuristic_min_lifetime",
+  "proxy.config.http.cache.heuristic_max_lifetime",
+  "proxy.config.http.cache.guaranteed_min_lifetime",
+  "proxy.config.http.cache.guaranteed_max_lifetime",
+  "proxy.config.http.cache.max_stale_age",
+  "proxy.config.http.keep_alive_no_activity_timeout_in",
+  "proxy.config.http.keep_alive_no_activity_timeout_out",
+  "proxy.config.http.transaction_no_activity_timeout_in",
+  "proxy.config.http.transaction_no_activity_timeout_out",
+  "proxy.config.http.transaction_active_timeout_out",
+  "proxy.config.http.origin_max_connections",
+  "proxy.config.http.connect_attempts_max_retries",
+  "proxy.config.http.connect_attempts_max_retries_dead_server",
+  "proxy.config.http.connect_attempts_rr_retries",
+  "proxy.config.http.connect_attempts_timeout",
+  "proxy.config.http.post_connect_attempts_timeout",
+  "proxy.config.http.down_server.cache_time",
+  "proxy.config.http.down_server.abort_threshold",
+  "proxy.config.http.cache.fuzz.time",
+  "proxy.config.http.cache.fuzz.min_time",
+  "proxy.config.http.doc_in_cache_skip_dns",
+  "proxy.config.http.background_fill_active_timeout",
+  "proxy.config.http.response_server_str",
+  "proxy.config.http.cache.heuristic_lm_factor",
+  "proxy.config.http.cache.fuzz.probability",
+  "proxy.config.http.background_fill_completed_threshold",
+  "proxy.config.net.sock_packet_mark_out",
+  "proxy.config.net.sock_packet_tos_out",
+  "proxy.config.http.insert_age_in_response",
+  "proxy.config.http.chunking.size",
+  "proxy.config.http.flow_control.enabled",
+  "proxy.config.http.flow_control.low_water",
+  "proxy.config.http.flow_control.high_water",
+  "proxy.config.http.cache.range.lookup",
+  "proxy.config.http.normalize_ae_gzip",
+  "proxy.config.http.default_buffer_size",
+  "proxy.config.http.default_buffer_water_mark",
+  "proxy.config.http.request_header_max_size",
+  "proxy.config.http.response_header_max_size",
+  "proxy.config.http.negative_revalidating_enabled",
+  "proxy.config.http.negative_revalidating_lifetime",
+  "proxy.config.http.accept_encoding_filter_enabled",
+  "proxy.config.ssl.hsts_max_age",
+  "proxy.config.ssl.hsts_include_subdomains",
+  "proxy.config.http.cache.open_read_retry_time",
+  "proxy.config.http.cache.max_open_read_retries",
+  "proxy.config.http.cache.range.write",
+  "proxy.config.http.post.check.content_length.enabled",
+  "proxy.config.http.global_user_agent_header",
+  "proxy.config.http.auth_server_session_private",
+  "proxy.config.http.slow.log.threshold",
+  "proxy.config.http.cache.generation",
+  "proxy.config.body_factory.template_base",
+  "proxy.config.http.cache.open_write_fail_action",
+  "proxy.config.http.redirection_enabled",
+  "proxy.config.http.number_of_redirections",
+  "proxy.config.http.cache.max_open_write_retries",
+  "proxy.config.http.redirect_use_orig_cache_key",
+  "proxy.config.http.attach_server_session_to_client",
+  "proxy.config.http.origin_max_connections_queue",
+  "proxy.config.websocket.no_activity_timeout",
+  "proxy.config.websocket.active_timeout",
+};
 
 REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
 {

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 03/04: TS-4401 Override proxy.config.http.uncacheable_requests_bypass_parent

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit ea4f7e2c0a346e7a34a93816fcbfb45357a641f2
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sat Apr 30 12:58:58 2016 -0600

    TS-4401 Override proxy.config.http.uncacheable_requests_bypass_parent
---
 doc/admin-guide/files/records.config.en.rst      |  2 +
 lib/ts/apidefs.h.in                              |  1 +
 plugins/experimental/ts_lua/ts_lua_http_config.c |  2 +
 proxy/InkAPI.cc                                  |  5 +++
 proxy/InkAPITest.cc                              |  1 +
 proxy/http/HttpConfig.cc                         |  4 +-
 proxy/http/HttpConfig.h                          | 49 ++++++++++++------------
 proxy/http/HttpTransact.cc                       |  2 +-
 8 files changed, 39 insertions(+), 27 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index 67a9b09..f3c0595 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -1315,6 +1315,8 @@ Origin Server Connect Attempts
    because the origin server was too slow in sending the response header.
 
 .. ts:cv:: CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 1
+   :reloadable:
+   :overridable:
 
    When enabled (1), Traffic Server bypasses the parent proxy for a request that is not cacheable.
 
diff --git a/lib/ts/apidefs.h.in b/lib/ts/apidefs.h.in
index b876e99..d4b94db 100644
--- a/lib/ts/apidefs.h.in
+++ b/lib/ts/apidefs.h.in
@@ -697,6 +697,7 @@ typedef enum {
   TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE,
   TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT,
   TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT,
+  TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT,
   TS_CONFIG_LAST_ENTRY
 } TSOverridableConfigKey;
 
diff --git a/plugins/experimental/ts_lua/ts_lua_http_config.c b/plugins/experimental/ts_lua/ts_lua_http_config.c
index 952af54..aca39ce 100644
--- a/plugins/experimental/ts_lua/ts_lua_http_config.c
+++ b/plugins/experimental/ts_lua/ts_lua_http_config.c
@@ -116,6 +116,7 @@ typedef enum {
   TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE = TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE,
   TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT = TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT,
   TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT = TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT,
+  TS_LUA_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT = TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT,
   TS_LUA_CONFIG_LAST_ENTRY = TS_CONFIG_LAST_ENTRY,
 } TSLuaOverridableConfigKey;
 
@@ -224,6 +225,7 @@ ts_lua_var_item ts_lua_http_config_vars[] = {
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_LAST_ENTRY),
 };
 
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index f0ac359..c28f3ab 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7956,6 +7956,9 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->websocket_active_timeout;
     break;
+  case TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT:
+    ret = &overridableHttpConfig->uncacheable_requests_bypass_parent;
+    break;
   // This helps avoiding compiler warnings, yet detect unhandled enum members.
   case TS_CONFIG_NULL:
   case TS_CONFIG_LAST_ENTRY:
@@ -8579,6 +8582,8 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey *conf,
     case 't':
       if (!strncmp(name, "proxy.config.http.keep_alive_no_activity_timeout_out", length))
         cnf = TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT;
+      else if (!strncmp(name, "proxy.config.http.uncacheable_requests_bypass_parent", length))
+        cnf = TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT;
       break;
     }
     break;
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index 4445e47..d3b5716 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -7353,6 +7353,7 @@ const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = {
   "proxy.config.http.origin_max_connections_queue",
   "proxy.config.websocket.no_activity_timeout",
   "proxy.config.websocket.active_timeout",
+  "proxy.config.http.uncacheable_requests_bypass_parent",
 };
 
 REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index d40f9e9..c82d2d9 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -891,7 +891,7 @@ HttpConfig::startup()
   // Wank me.
   HttpEstablishStaticConfigByte(c.disable_ssl_parenting, "proxy.local.http.parent_proxy.disable_connect_tunneling");
   HttpEstablishStaticConfigByte(c.no_dns_forward_to_parent, "proxy.config.http.no_dns_just_forward_to_parent");
-  HttpEstablishStaticConfigByte(c.uncacheable_requests_bypass_parent, "proxy.config.http.uncacheable_requests_bypass_parent");
+  HttpEstablishStaticConfigByte(c.oride.uncacheable_requests_bypass_parent, "proxy.config.http.uncacheable_requests_bypass_parent");
   HttpEstablishStaticConfigByte(c.oride.doc_in_cache_skip_dns, "proxy.config.http.doc_in_cache_skip_dns");
 
   HttpEstablishStaticConfigByte(c.no_origin_server_dns, "proxy.config.http.no_origin_server_dns");
@@ -1144,7 +1144,7 @@ HttpConfig::reconfigure()
   params->proxy_hostname = ats_strdup(m_master.proxy_hostname);
   params->proxy_hostname_len = (params->proxy_hostname) ? strlen(params->proxy_hostname) : 0;
   params->no_dns_forward_to_parent = INT_TO_BOOL(m_master.no_dns_forward_to_parent);
-  params->uncacheable_requests_bypass_parent = INT_TO_BOOL(m_master.uncacheable_requests_bypass_parent);
+  params->oride.uncacheable_requests_bypass_parent = INT_TO_BOOL(m_master.oride.uncacheable_requests_bypass_parent);
   params->no_origin_server_dns = INT_TO_BOOL(m_master.no_origin_server_dns);
   params->use_client_target_addr = m_master.use_client_target_addr;
   params->use_client_source_port = INT_TO_BOOL(m_master.use_client_source_port);
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index ef3c608..9330fa6 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -363,27 +363,28 @@ struct OverridableHttpConfigParams {
     : maintain_pristine_host_hdr(1), chunking_enabled(1), negative_caching_enabled(0), negative_revalidating_enabled(0),
       cache_when_to_revalidate(0), keep_alive_enabled_in(1), keep_alive_enabled_out(1), keep_alive_post_out(1),
       server_session_sharing_match(TS_SERVER_SESSION_SHARING_MATCH_BOTH), auth_server_session_private(1),
-      fwd_proxy_auth_to_parent(0), insert_age_in_response(1), anonymize_remove_from(0), anonymize_remove_referer(0),
-      anonymize_remove_user_agent(0), anonymize_remove_cookie(0), anonymize_remove_client_ip(0), anonymize_insert_client_ip(1),
-      proxy_response_server_enabled(1), proxy_response_hsts_max_age(-1), proxy_response_hsts_include_subdomains(0),
-      insert_squid_x_forwarded_for(1), send_http11_requests(1), cache_http(1), cache_cluster_cache_local(0),
-      cache_ignore_client_no_cache(1), cache_ignore_client_cc_max_age(0), cache_ims_on_client_no_cache(1),
-      cache_ignore_server_no_cache(0), cache_responses_to_cookies(1), cache_ignore_auth(0), cache_urls_that_look_dynamic(1),
-      cache_required_headers(2), cache_range_lookup(1), cache_range_write(0), insert_request_via_string(1),
-      insert_response_via_string(0), doc_in_cache_skip_dns(1), flow_control_enabled(0), accept_encoding_filter_enabled(0),
-      normalize_ae_gzip(0), negative_caching_lifetime(1800), negative_revalidating_lifetime(1800), sock_recv_buffer_size_out(0),
-      sock_send_buffer_size_out(0), sock_option_flag_out(0), sock_packet_mark_out(0), sock_packet_tos_out(0),
-      server_tcp_init_cwnd(0), request_hdr_max_size(131072), response_hdr_max_size(131072), post_check_content_length_enabled(1),
-      cache_heuristic_min_lifetime(3600), cache_heuristic_max_lifetime(86400), cache_guaranteed_min_lifetime(0),
-      cache_guaranteed_max_lifetime(31536000), cache_max_stale_age(604800), keep_alive_no_activity_timeout_in(115),
-      keep_alive_no_activity_timeout_out(120), transaction_no_activity_timeout_in(30), transaction_no_activity_timeout_out(30),
-      transaction_active_timeout_out(0), websocket_active_timeout(3600), websocket_inactive_timeout(600), origin_max_connections(0),
-      origin_max_connections_queue(0), attach_server_session_to_client(0), connect_attempts_max_retries(0),
-      connect_attempts_max_retries_dead_server(3), connect_attempts_rr_retries(3), connect_attempts_timeout(30),
-      post_connect_attempts_timeout(1800), down_server_timeout(300), client_abort_threshold(10), freshness_fuzz_time(240),
-      freshness_fuzz_min_time(0), max_cache_open_read_retries(-1), cache_open_read_retry_time(10), cache_generation_number(-1),
-      max_cache_open_write_retries(1), background_fill_active_timeout(60), http_chunking_size(4096), flow_high_water_mark(0),
-      flow_low_water_mark(0), default_buffer_size_index(8), default_buffer_water_mark(32768), slow_log_threshold(0),
+      fwd_proxy_auth_to_parent(0), uncacheable_requests_bypass_parent(1), insert_age_in_response(1), anonymize_remove_from(0),
+      anonymize_remove_referer(0), anonymize_remove_user_agent(0), anonymize_remove_cookie(0), anonymize_remove_client_ip(0),
+      anonymize_insert_client_ip(1), proxy_response_server_enabled(1), proxy_response_hsts_max_age(-1),
+      proxy_response_hsts_include_subdomains(0), insert_squid_x_forwarded_for(1), send_http11_requests(1), cache_http(1),
+      cache_cluster_cache_local(0), cache_ignore_client_no_cache(1), cache_ignore_client_cc_max_age(0),
+      cache_ims_on_client_no_cache(1), cache_ignore_server_no_cache(0), cache_responses_to_cookies(1), cache_ignore_auth(0),
+      cache_urls_that_look_dynamic(1), cache_required_headers(2), cache_range_lookup(1), cache_range_write(0),
+      insert_request_via_string(1), insert_response_via_string(0), doc_in_cache_skip_dns(1), flow_control_enabled(0),
+      accept_encoding_filter_enabled(0), normalize_ae_gzip(0), negative_caching_lifetime(1800),
+      negative_revalidating_lifetime(1800), sock_recv_buffer_size_out(0), sock_send_buffer_size_out(0), sock_option_flag_out(0),
+      sock_packet_mark_out(0), sock_packet_tos_out(0), server_tcp_init_cwnd(0), request_hdr_max_size(131072),
+      response_hdr_max_size(131072), post_check_content_length_enabled(1), cache_heuristic_min_lifetime(3600),
+      cache_heuristic_max_lifetime(86400), cache_guaranteed_min_lifetime(0), cache_guaranteed_max_lifetime(31536000),
+      cache_max_stale_age(604800), keep_alive_no_activity_timeout_in(115), keep_alive_no_activity_timeout_out(120),
+      transaction_no_activity_timeout_in(30), transaction_no_activity_timeout_out(30), transaction_active_timeout_out(0),
+      websocket_active_timeout(3600), websocket_inactive_timeout(600), origin_max_connections(0), origin_max_connections_queue(0),
+      attach_server_session_to_client(0), connect_attempts_max_retries(0), connect_attempts_max_retries_dead_server(3),
+      connect_attempts_rr_retries(3), connect_attempts_timeout(30), post_connect_attempts_timeout(1800), down_server_timeout(300),
+      client_abort_threshold(10), freshness_fuzz_time(240), freshness_fuzz_min_time(0), max_cache_open_read_retries(-1),
+      cache_open_read_retry_time(10), cache_generation_number(-1), max_cache_open_write_retries(1),
+      background_fill_active_timeout(60), http_chunking_size(4096), flow_high_water_mark(0), flow_low_water_mark(0),
+      default_buffer_size_index(8), default_buffer_water_mark(32768), slow_log_threshold(0),
 
       // Strings / floats must come last
       body_factory_template_base(NULL), body_factory_template_base_len(0), proxy_response_server_string(NULL),
@@ -417,6 +418,7 @@ struct OverridableHttpConfigParams {
   //  MgmtByte share_server_sessions;
   MgmtByte auth_server_session_private;
   MgmtByte fwd_proxy_auth_to_parent;
+  MgmtByte uncacheable_requests_bypass_parent;
 
   MgmtByte insert_age_in_response;
 
@@ -642,7 +644,6 @@ public:
 
   MgmtByte enable_url_expandomatic;
   MgmtByte no_dns_forward_to_parent;
-  MgmtByte uncacheable_requests_bypass_parent;
   MgmtByte no_origin_server_dns;
   MgmtByte use_client_target_addr;
   MgmtByte use_client_source_port;
@@ -851,8 +852,8 @@ extern volatile int32_t icp_dynamic_enabled;
 /////////////////////////////////////////////////////////////
 inline HttpConfigParams::HttpConfigParams()
   : proxy_hostname(NULL), proxy_hostname_len(0), server_max_connections(0), origin_min_keep_alive_connections(0),
-    max_websocket_connections(-1), disable_ssl_parenting(0), enable_url_expandomatic(0), no_dns_forward_to_parent(0),
-    uncacheable_requests_bypass_parent(1), no_origin_server_dns(0), use_client_target_addr(0), use_client_source_port(0),
+    max_websocket_connections(-1), disable_ssl_parenting(0), enable_url_expandomatic(0),
+    no_dns_forward_to_parent(0), no_origin_server_dns(0), use_client_target_addr(0), use_client_source_port(0),
     proxy_request_via_string(NULL), proxy_request_via_string_len(0), proxy_response_via_string(NULL),
     proxy_response_via_string_len(0), url_expansions_string(NULL), url_expansions(NULL), num_url_expansions(0),
     session_auth_cache_keep_alive_enabled(1), transaction_active_timeout_in(900), accept_no_activity_timeout(120),
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 1985bd3..b46850c 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -257,7 +257,7 @@ find_server_and_update_current_info(HttpTransact::State *s)
       DebugTxn("http_trans", "request not cacheable, so bypass parent");
       s->parent_result.result = PARENT_DIRECT;
     }
-  } else if (s->http_config_param->uncacheable_requests_bypass_parent && s->http_config_param->no_dns_forward_to_parent == 0 &&
+  } else if (s->txn_conf->uncacheable_requests_bypass_parent && s->http_config_param->no_dns_forward_to_parent == 0 &&
              !HttpTransact::is_request_cache_lookupable(s)) {
     // request not lookupable and cacheable, so bypass parent if the parent is not an origin server.
     // Note that the configuration of the proxy as well as the request

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 04/04: TS-4401 Override proxy.config.http.parent_proxy.total_connect_attempts

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit d59ee2b9c827c50920741e465b5e966cec07fac5
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sat Apr 30 16:16:32 2016 -0600

    TS-4401 Override proxy.config.http.parent_proxy.total_connect_attempts
---
 doc/admin-guide/files/records.config.en.rst      |  1 +
 lib/ts/apidefs.h.in                              |  1 +
 plugins/experimental/ts_lua/ts_lua_http_config.c |  2 ++
 proxy/InkAPI.cc                                  |  9 +++++++++
 proxy/InkAPITest.cc                              |  1 +
 proxy/http/HttpConfig.cc                         |  4 ++--
 proxy/http/HttpConfig.h                          | 19 +++++++++----------
 proxy/http/HttpTransact.cc                       |  2 +-
 8 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index f3c0595..36102da 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -1067,6 +1067,7 @@ Parent Proxy Configuration
 
 .. ts:cv:: CONFIG proxy.config.http.parent_proxy.total_connect_attempts INT 4
    :reloadable:
+   :overridable:
 
    The total number of connection attempts allowed to a parent cache before Traffic Server bypasses the parent or fails the request
    (depending on the ``go_direct`` option in the :file:`parent.config` file).
diff --git a/lib/ts/apidefs.h.in b/lib/ts/apidefs.h.in
index d4b94db..4fb0977 100644
--- a/lib/ts/apidefs.h.in
+++ b/lib/ts/apidefs.h.in
@@ -698,6 +698,7 @@ typedef enum {
   TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT,
   TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT,
   TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT,
+  TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS,
   TS_CONFIG_LAST_ENTRY
 } TSOverridableConfigKey;
 
diff --git a/plugins/experimental/ts_lua/ts_lua_http_config.c b/plugins/experimental/ts_lua/ts_lua_http_config.c
index aca39ce..031a2a3 100644
--- a/plugins/experimental/ts_lua/ts_lua_http_config.c
+++ b/plugins/experimental/ts_lua/ts_lua_http_config.c
@@ -117,6 +117,7 @@ typedef enum {
   TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT = TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT,
   TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT = TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT,
   TS_LUA_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT = TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT,
+  TS_LUA_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS = TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS,
   TS_LUA_CONFIG_LAST_ENTRY = TS_CONFIG_LAST_ENTRY,
 } TSLuaOverridableConfigKey;
 
@@ -226,6 +227,7 @@ ts_lua_var_item ts_lua_http_config_vars[] = {
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT),
+  TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS),
   TS_LUA_MAKE_VAR_ITEM(TS_LUA_CONFIG_LAST_ENTRY),
 };
 
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index c28f3ab..3720b19 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7959,6 +7959,10 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
   case TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT:
     ret = &overridableHttpConfig->uncacheable_requests_bypass_parent;
     break;
+  case TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS:
+    typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->parent_connect_attempts;
+    break;
   // This helps avoiding compiler warnings, yet detect unhandled enum members.
   case TS_CONFIG_NULL:
   case TS_CONFIG_LAST_ENTRY:
@@ -8600,6 +8604,11 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey *conf,
         cnf = TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD;
       }
       break;
+    case 's':
+      if (!strncmp(name, "proxy.config.http.parent_proxy.total_connect_attempts", length)) {
+        cnf = TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS;
+      }
+      break;
     }
     break;
 
diff --git a/proxy/InkAPITest.cc b/proxy/InkAPITest.cc
index d3b5716..82cd9bb 100644
--- a/proxy/InkAPITest.cc
+++ b/proxy/InkAPITest.cc
@@ -7354,6 +7354,7 @@ const char *SDK_Overridable_Configs[TS_CONFIG_LAST_ENTRY] = {
   "proxy.config.websocket.no_activity_timeout",
   "proxy.config.websocket.active_timeout",
   "proxy.config.http.uncacheable_requests_bypass_parent",
+  "proxy.config.http.parent_proxy.total_connect_attempts",
 };
 
 REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index c82d2d9..672748e 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -957,7 +957,7 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_rr_retries, "proxy.config.http.connect_attempts_rr_retries");
   HttpEstablishStaticConfigLongLong(c.oride.connect_attempts_timeout, "proxy.config.http.connect_attempts_timeout");
   HttpEstablishStaticConfigLongLong(c.oride.post_connect_attempts_timeout, "proxy.config.http.post_connect_attempts_timeout");
-  HttpEstablishStaticConfigLongLong(c.parent_connect_attempts, "proxy.config.http.parent_proxy.total_connect_attempts");
+  HttpEstablishStaticConfigLongLong(c.oride.parent_connect_attempts, "proxy.config.http.parent_proxy.total_connect_attempts");
   HttpEstablishStaticConfigLongLong(c.per_parent_connect_attempts, "proxy.config.http.parent_proxy.per_parent_connect_attempts");
   HttpEstablishStaticConfigLongLong(c.parent_connect_timeout, "proxy.config.http.parent_proxy.connect_attempts_timeout");
 
@@ -1230,7 +1230,7 @@ HttpConfig::reconfigure()
   params->oride.connect_attempts_rr_retries = m_master.oride.connect_attempts_rr_retries;
   params->oride.connect_attempts_timeout = m_master.oride.connect_attempts_timeout;
   params->oride.post_connect_attempts_timeout = m_master.oride.post_connect_attempts_timeout;
-  params->parent_connect_attempts = m_master.parent_connect_attempts;
+  params->oride.parent_connect_attempts = m_master.oride.parent_connect_attempts;
   params->per_parent_connect_attempts = m_master.per_parent_connect_attempts;
   params->parent_connect_timeout = m_master.parent_connect_timeout;
 
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 9330fa6..3cd75f3 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -380,9 +380,9 @@ struct OverridableHttpConfigParams {
       transaction_no_activity_timeout_in(30), transaction_no_activity_timeout_out(30), transaction_active_timeout_out(0),
       websocket_active_timeout(3600), websocket_inactive_timeout(600), origin_max_connections(0), origin_max_connections_queue(0),
       attach_server_session_to_client(0), connect_attempts_max_retries(0), connect_attempts_max_retries_dead_server(3),
-      connect_attempts_rr_retries(3), connect_attempts_timeout(30), post_connect_attempts_timeout(1800), down_server_timeout(300),
-      client_abort_threshold(10), freshness_fuzz_time(240), freshness_fuzz_min_time(0), max_cache_open_read_retries(-1),
-      cache_open_read_retry_time(10), cache_generation_number(-1), max_cache_open_write_retries(1),
+      connect_attempts_rr_retries(3), connect_attempts_timeout(30), post_connect_attempts_timeout(1800), parent_connect_attempts(4),
+      down_server_timeout(300), client_abort_threshold(10), freshness_fuzz_time(240), freshness_fuzz_min_time(0),
+      max_cache_open_read_retries(-1), cache_open_read_retry_time(10), cache_generation_number(-1), max_cache_open_write_retries(1),
       background_fill_active_timeout(60), http_chunking_size(4096), flow_high_water_mark(0), flow_low_water_mark(0),
       default_buffer_size_index(8), default_buffer_water_mark(32768), slow_log_threshold(0),
 
@@ -544,6 +544,7 @@ struct OverridableHttpConfigParams {
   MgmtInt connect_attempts_rr_retries;
   MgmtInt connect_attempts_timeout;
   MgmtInt post_connect_attempts_timeout;
+  MgmtInt parent_connect_attempts;
 
   MgmtInt down_server_timeout;
   MgmtInt client_abort_threshold;
@@ -670,7 +671,6 @@ public:
   ////////////////////////////////////
   // origin server connect attempts //
   ////////////////////////////////////
-  MgmtInt parent_connect_attempts;
   MgmtInt per_parent_connect_attempts;
   MgmtInt parent_connect_timeout;
 
@@ -852,12 +852,11 @@ extern volatile int32_t icp_dynamic_enabled;
 /////////////////////////////////////////////////////////////
 inline HttpConfigParams::HttpConfigParams()
   : proxy_hostname(NULL), proxy_hostname_len(0), server_max_connections(0), origin_min_keep_alive_connections(0),
-    max_websocket_connections(-1), disable_ssl_parenting(0), enable_url_expandomatic(0),
-    no_dns_forward_to_parent(0), no_origin_server_dns(0), use_client_target_addr(0), use_client_source_port(0),
-    proxy_request_via_string(NULL), proxy_request_via_string_len(0), proxy_response_via_string(NULL),
-    proxy_response_via_string_len(0), url_expansions_string(NULL), url_expansions(NULL), num_url_expansions(0),
-    session_auth_cache_keep_alive_enabled(1), transaction_active_timeout_in(900), accept_no_activity_timeout(120),
-    parent_connect_attempts(4), per_parent_connect_attempts(2), parent_connect_timeout(30), anonymize_other_header_list(NULL),
+    max_websocket_connections(-1), disable_ssl_parenting(0), enable_url_expandomatic(0), no_dns_forward_to_parent(0),
+    no_origin_server_dns(0), use_client_target_addr(0), use_client_source_port(0), proxy_request_via_string(NULL),
+    proxy_request_via_string_len(0), proxy_response_via_string(NULL), proxy_response_via_string_len(0), url_expansions_string(NULL),
+    url_expansions(NULL), num_url_expansions(0), session_auth_cache_keep_alive_enabled(1), transaction_active_timeout_in(900),
+    accept_no_activity_timeout(120), per_parent_connect_attempts(2), parent_connect_timeout(30), anonymize_other_header_list(NULL),
     enable_http_stats(1), icp_enabled(0), stale_icp_enabled(0), cache_vary_default_text(NULL), cache_vary_default_images(NULL),
     cache_vary_default_other(NULL), cache_enable_default_vary_headers(0), cache_post_method(0), connect_ports_string(NULL),
     connect_ports(NULL), push_method_enabled(0), referer_filter_enabled(0), referer_format_redirect(0), strict_uri_parsing(0),
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index b46850c..9cdf1df 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -3611,7 +3611,7 @@ HttpTransact::handle_response_from_parent(State *s)
           next_lookup = find_server_and_update_current_info(s);
         }
       }
-    } else if (s->current.attempts < s->http_config_param->parent_connect_attempts) {
+    } else if (s->current.attempts < s->txn_conf->parent_connect_attempts) {
       s->current.attempts++;
 
       // Are we done with this particular parent?

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 02/04: TS-4401 Cleanup of the overridable switch statement

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 1f71d177d8d33774c14c907f77317ecfabd23f36
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sat Apr 30 12:10:26 2016 -0600

    TS-4401 Cleanup of the overridable switch statement
    
    This does two things:
    
    1) It fixes a couple of places where the type is set to
    MgmtInt, when in reality they are MgmtByte's (and vice
    versa).
    
    2) Reorder the case statements, to be inline with the
    cardinality of the enum type.
---
 proxy/InkAPI.cc | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index 66f9f50..f0ac359 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7636,9 +7636,6 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
   case TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUT:
     ret = &overridableHttpConfig->keep_alive_post_out;
     break;
-  case TS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATE:
-    ret = &overridableHttpConfig->auth_server_session_private;
-    break;
   case TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCH:
     ret = &overridableHttpConfig->server_session_sharing_match;
     break;
@@ -7892,12 +7889,6 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
   case TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS:
     ret = &overridableHttpConfig->proxy_response_hsts_include_subdomains;
     break;
-  case TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT:
-    ret = &overridableHttpConfig->websocket_active_timeout;
-    break;
-  case TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT:
-    ret = &overridableHttpConfig->websocket_inactive_timeout;
-    break;
   case TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME:
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->cache_open_read_retry_time;
@@ -7906,21 +7897,9 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->max_cache_open_read_retries;
     break;
-  case TS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES:
-    typ = OVERRIDABLE_TYPE_INT;
-    ret = &overridableHttpConfig->max_cache_open_write_retries;
-    break;
-  case TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION:
-    typ = OVERRIDABLE_TYPE_INT;
-    ret = &overridableHttpConfig->cache_open_write_fail_action;
-    break;
   case TS_CONFIG_HTTP_CACHE_RANGE_WRITE:
     ret = &overridableHttpConfig->cache_range_write;
     break;
-  case TS_CONFIG_HTTP_CACHE_GENERATION:
-    typ = OVERRIDABLE_TYPE_INT;
-    ret = &overridableHttpConfig->cache_generation_number;
-    break;
   case TS_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLED:
     ret = &overridableHttpConfig->post_check_content_length_enabled;
     break;
@@ -7928,24 +7907,37 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     typ = OVERRIDABLE_TYPE_STRING;
     ret = &overridableHttpConfig->global_user_agent_header;
     break;
+  case TS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATE:
+    ret = &overridableHttpConfig->auth_server_session_private;
+    break;
   case TS_CONFIG_HTTP_SLOW_LOG_THRESHOLD:
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->slow_log_threshold;
     break;
+  case TS_CONFIG_HTTP_CACHE_GENERATION:
+    typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->cache_generation_number;
+    break;
   case TS_CONFIG_BODY_FACTORY_TEMPLATE_BASE:
     typ = OVERRIDABLE_TYPE_STRING;
     ret = &overridableHttpConfig->body_factory_template_base;
     break;
-  case TS_CONFIG_HTTP_ENABLE_REDIRECTION:
+  case TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION:
     typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->cache_open_write_fail_action;
+    break;
+  case TS_CONFIG_HTTP_ENABLE_REDIRECTION:
     ret = &overridableHttpConfig->redirection_enabled;
     break;
   case TS_CONFIG_HTTP_NUMBER_OF_REDIRECTIONS:
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->number_of_redirections;
     break;
-  case TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY:
+  case TS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES:
     typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->max_cache_open_write_retries;
+    break;
+  case TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY:
     ret = &overridableHttpConfig->redirect_use_orig_cache_key;
     break;
   case TS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENT:
@@ -7956,6 +7948,14 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->origin_max_connections_queue;
     break;
+  case TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT:
+    typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->websocket_inactive_timeout;
+    break;
+  case TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT:
+    typ = OVERRIDABLE_TYPE_INT;
+    ret = &overridableHttpConfig->websocket_active_timeout;
+    break;
   // This helps avoiding compiler warnings, yet detect unhandled enum members.
   case TS_CONFIG_NULL:
   case TS_CONFIG_LAST_ENTRY:

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.