Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions doc/admin-guide/files/records.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,6 @@ ip-resolve
``1`` ``Age`` header is added.
===== ======================================================================

.. ts:cv:: CONFIG proxy.config.http.enable_url_expandomatic INT 0
:reloadable:

Enables (``1``) or disables (``0``) ``.com`` domain expansion. This configures the Traffic Server to resolve unqualified hostnames by
prepending with ``www.`` and appending with ``.com`` before redirecting to the expanded address. For example: if a client makes
a request to ``host``, then Traffic Server redirects the request to ``www.host.com``.

.. ts:cv:: CONFIG proxy.config.http.chunking_enabled INT 1
:reloadable:
:overridable:
Expand Down Expand Up @@ -2293,12 +2286,6 @@ DNS
Traffic Server to add the hostname extension .org, then specify ``org`` as the value for this variable (Traffic Server automatically
adds the dot (.)).

.. note::

If the variable :ts:cv:`proxy.config.http.enable_url_expandomatic` is set to ``1`` (the default value), then you do not have to
add ``www.`` and ``.com`` to this list because Traffic Server automatically tries www. and .com after trying the values
you've specified.

.. ts:cv:: CONFIG proxy.config.dns.resolv_conf STRING /etc/resolv.conf

Allows to specify which ``resolv.conf`` file to use for finding resolvers. While the format of this file must be the same as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3610,14 +3610,6 @@ msgid ""
"variable (Traffic Server automatically adds the dot (.))."
msgstr ""

#: ../../../admin-guide/files/records.config.en.rst:2272
msgid ""
"If the variable :ts:cv:`proxy.config.http.enable_url_expandomatic` is set "
"to ``1`` (the default value), then you do not have to add ``www.`` and ``."
"com`` to this list because Traffic Server automatically tries www. and .com "
"after trying the values you've specified."
msgstr ""

#: ../../../admin-guide/files/records.config.en.rst:2278
msgid ""
"Allows to specify which ``resolv.conf`` file to use for finding resolvers. "
Expand Down
1 change: 0 additions & 1 deletion lib/perl/lib/Apache/TS/AdminClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.http.enabled
proxy.config.http.enable_http_info
proxy.config.http.enable_http_stats
proxy.config.http.enable_url_expandomatic
proxy.config.http.errors.log_error_pages
proxy.config.http.forward.proxy_auth_to_parent
proxy.config.http.global_user_agent_header
Expand Down
2 changes: 0 additions & 2 deletions mgmt/RecordsConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.http.response_server_str", RECD_STRING, "ATS/" PACKAGE_VERSION, RECU_DYNAMIC, RR_NULL, RECC_NULL, ".*", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.enable_url_expandomatic", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.no_dns_just_forward_to_parent", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.uncacheable_requests_bypass_parent", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
Expand Down
4 changes: 0 additions & 4 deletions proxy/http/HttpConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigByte(c.use_client_source_port, "proxy.config.http.use_client_source_port");
HttpEstablishStaticConfigByte(c.oride.maintain_pristine_host_hdr, "proxy.config.url_remap.pristine_host_hdr");

HttpEstablishStaticConfigByte(c.enable_url_expandomatic, "proxy.config.http.enable_url_expandomatic");

HttpEstablishStaticConfigByte(c.oride.insert_request_via_string, "proxy.config.http.insert_request_via_str");
HttpEstablishStaticConfigByte(c.oride.insert_response_via_string, "proxy.config.http.insert_response_via_str");
HttpEstablishStaticConfigLongLong(c.oride.proxy_response_hsts_max_age, "proxy.config.ssl.hsts_max_age");
Expand Down Expand Up @@ -1175,8 +1173,6 @@ HttpConfig::reconfigure()
params->origin_min_keep_alive_connections = params->oride.origin_max_connections;
}

params->enable_url_expandomatic = INT_TO_BOOL(m_master.enable_url_expandomatic);

params->oride.insert_request_via_string = m_master.oride.insert_request_via_string;
params->oride.insert_response_via_string = m_master.oride.insert_response_via_string;
params->proxy_request_via_string = ats_strdup(m_master.proxy_request_via_string);
Expand Down
2 changes: 0 additions & 2 deletions proxy/http/HttpConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,6 @@ struct HttpConfigParams : public ConfigInfo {

MgmtByte disable_ssl_parenting;

MgmtByte enable_url_expandomatic;
MgmtByte no_dns_forward_to_parent;
MgmtByte no_origin_server_dns;
MgmtByte use_client_target_addr;
Expand Down Expand Up @@ -939,7 +938,6 @@ inline HttpConfigParams::HttpConfigParams()
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),
Expand Down
39 changes: 1 addition & 38 deletions proxy/http/HttpTransact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,6 @@ HttpTransact::OSDNSLookup(State *s)
} else {
if (host_name_expansion == EXPANSION_NOT_ALLOWED) {
// config file doesn't allow automatic expansion of host names
HTTP_RELEASE_ASSERT(!(s->http_config_param->enable_url_expandomatic));
DebugTxn("http_seq", "[HttpTransact::OSDNSLookup] DNS Lookup unsuccessful");
} else if (host_name_expansion == EXPANSION_FAILED) {
// not able to expand the hostname. dns lookup failed
Expand Down Expand Up @@ -6675,46 +6674,10 @@ HttpTransact::process_quick_http_filter(State *s, int method)
HttpTransact::HostNameExpansionError_t
HttpTransact::try_to_expand_host_name(State *s)
{
static int max_dns_lookups = 2 + s->http_config_param->num_url_expansions;
static int last_expansion = max_dns_lookups - 2;

HTTP_RELEASE_ASSERT(!s->dns_info.lookup_success);

if (s->dns_info.looking_up == ORIGIN_SERVER) {
///////////////////////////////////////////////////
// if resolving dns of the origin server failed, //
// we try to expand hostname. //
///////////////////////////////////////////////////
if (s->http_config_param->enable_url_expandomatic) {
int attempts = s->dns_info.attempts;
ink_assert(attempts >= 1 && attempts <= max_dns_lookups);

if (attempts < max_dns_lookups) {
// Try a URL expansion
if (attempts <= last_expansion) {
char *expansion = s->http_config_param->url_expansions[attempts - 1];
int length = strlen(s->server_info.name) + strlen(expansion) + 1;

s->dns_info.lookup_name = s->arena.str_alloc(length);
ink_string_concatenate_strings_n(s->dns_info.lookup_name, length + 1, s->server_info.name, ".", expansion, NULL);
} else {
if (ParseRules::strchr(s->server_info.name, '.')) {
// don't expand if contains '.'
return (EXPANSION_FAILED);
}
// Try www.<server_name>.com
int length = strlen(s->server_info.name) + 8;

s->dns_info.lookup_name = s->arena.str_alloc(length);
ink_string_concatenate_strings_n(s->dns_info.lookup_name, length + 1, "www.", s->server_info.name, ".com", NULL);
}
return RETRY_EXPANDED_NAME;
} else {
return DNS_ATTEMPTS_EXHAUSTED;
}
} else {
return EXPANSION_NOT_ALLOWED;
}
return EXPANSION_NOT_ALLOWED;
} else {
//////////////////////////////////////////////////////
// we looked up dns of parent proxy, but it failed, //
Expand Down
3 changes: 1 addition & 2 deletions tools/traffic_shell.pl
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ sub show_cluster {
#
sub show_dns_resolver {
my $dns_search_default_domains = get_on_off("proxy.config.dns.search_default_domains");
my $http_enable_url_expandomatic = get_on_off("proxy.config.http.enable_url_expandomatic");

print <<__EOF
Local Domain Expansion -- $dns_search_default_domains
.com Domain Expansion --- $http_enable_url_expandomatic
__EOF
}

Expand Down