724
726
DebugSM("http", "client header bytes were over max header size; treating as a bad request");
725
727
state = PARSE_ERROR;
730
if (event == VC_EVENT_READ_READY &&
731
state == PARSE_ERROR &&
732
is_transparent_passthrough_allowed() &&
733
ua_raw_buffer_reader != NULL) {
735
DebugSM("http", "[%" PRId64 "] first request on connection failed parsing, switching to passthrough.", sm_id);
737
t_state.transparent_passthrough = true;
738
http_parser_clear(&http_parser);
740
/* establish blind tunnel */
741
setup_blind_tunnel_port();
727
745
// Check to see if we are done parsing the header
728
746
if (state != PARSE_CONT || ua_entry->eos) {
747
if (ua_raw_buffer_reader != NULL) {
748
ua_raw_buffer_reader->dealloc();
749
ua_raw_buffer_reader = NULL;
729
751
http_parser_clear(&http_parser);
730
752
ua_entry->vc_handler = &HttpSM::state_watch_for_client_abort;
731
753
milestones.ua_read_header_done = ink_get_hrtime();
1944
1977
DebugSM("dns_srv", "beginning process_srv_info");
1946
SRVHosts s(r); /* handled by conversion constructor */
1947
char new_host[MAXDNAME];
1949
1979
/* we didnt get any SRV records, continue w normal lookup */
1950
if (!r->srv_count) {
1980
if (!r || !r->is_srv || !r->round_robin) {
1981
t_state.dns_info.srv_hostname[0] = '\0';
1982
t_state.dns_info.srv_lookup_success = false;
1983
t_state.srv_lookup = false;
1951
1984
DebugSM("dns_srv", "No SRV records were available, continuing to lookup %s", t_state.dns_info.lookup_name);
1952
ink_strlcpy(new_host, t_state.dns_info.lookup_name, sizeof(new_host));
1956
s.getWeightedHost(&new_host[0]);
1958
if (*new_host == '\0') {
1959
DebugSM("dns_srv", "Weighted host returned was NULL or blank!, using %s as origin", t_state.dns_info.lookup_name);
1960
ink_strlcpy(new_host, t_state.dns_info.lookup_name, sizeof(new_host));
1962
DebugSM("dns_srv", "Weighted host now: %s", new_host);
1965
DebugSM("dns_srv", "ending process_srv_info SRV stuff; moving on to lookup origin host");
1968
DebugSM("http_seq", "[HttpStateMachineGet::process_srv_info] Doing DNS Lookup based on SRV %s", new_host);
1970
int server_port = t_state.current.server ? t_state.current.server->port : t_state.server_info.port;
1972
HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_hostdb_lookup);
1974
if (t_state.api_txn_dns_timeout_value != -1) {
1975
DebugSM("http_timeout", "beginning DNS lookup. allowing %d mseconds for DNS", t_state.api_txn_dns_timeout_value);
1978
Action *dns_lookup_action_handle = hostDBProcessor.getbyname_imm(this,
1979
(process_hostdb_info_pfn) & HttpSM::
1980
process_hostdb_info,
1983
((t_state.cache_info.directives.
1984
does_client_permit_dns_storing) ? HostDBProcessor::
1985
HOSTDB_DO_NOT_FORCE_DNS : HostDBProcessor::
1986
HOSTDB_FORCE_DNS_RELOAD),
1987
(t_state.api_txn_dns_timeout_value != -1) ? t_state.
1988
api_txn_dns_timeout_value : 0);
1991
if (dns_lookup_action_handle != ACTION_RESULT_DONE) {
1992
ink_assert(!pending_action);
1993
pending_action = dns_lookup_action_handle;
1994
historical_action = pending_action;
1996
call_transact_and_set_next_state(NULL);
1986
HostDBRoundRobin *rr = r->rr();
1987
HostDBInfo *srv = NULL;
1989
srv = rr->select_best_srv(t_state.dns_info.srv_hostname, &mutex.m_ptr->thread_holding->generator,
1990
ink_cluster_time(), (int) t_state.txn_conf->down_server_timeout);
1993
t_state.dns_info.srv_lookup_success = false;
1994
t_state.dns_info.srv_hostname[0] = '\0';
1995
t_state.srv_lookup = false;
1996
DebugSM("dns_srv", "SRV records empty for %s", t_state.dns_info.lookup_name);
1998
ink_debug_assert(r->md5_high == srv->md5_high && r->md5_low == srv->md5_low &&
1999
r->md5_low_low == srv->md5_low_low);
2000
t_state.dns_info.srv_lookup_success = true;
2001
t_state.dns_info.srv_port = srv->data.srv.srv_port;
2002
t_state.dns_info.srv_app = srv->app;
2003
//t_state.dns_info.single_srv = (rr->good == 1);
2004
ink_debug_assert(srv->data.srv.key == makeHostHash(t_state.dns_info.srv_hostname));
2005
DebugSM("dns_srv", "select SRV records %s", t_state.dns_info.srv_hostname);
2002
2012
HttpSM::process_hostdb_info(HostDBInfo * r)
2005
HostDBInfo *rr = NULL;
2014
if (r && !r->failed()) {
2015
ink_time_t now = ink_cluster_time();
2016
HostDBInfo *ret = NULL;
2006
2017
t_state.dns_info.lookup_success = true;
2008
2018
if (r->round_robin) {
2009
2019
// Since the time elapsed between current time and client_request_time
2010
2020
// may be very large, we cannot use client_request_time to approximate
2011
2021
// current time when calling select_best_http().
2012
rr = r->rr()->select_best_http(&t_state.client_info.addr.sa, ink_cluster_time(), (int) t_state.txn_conf->down_server_timeout);
2022
HostDBRoundRobin *rr = r->rr();
2023
ret = rr->select_best_http(&t_state.client_info.addr.sa, now, (int) t_state.txn_conf->down_server_timeout);
2013
2024
t_state.dns_info.round_robin = true;
2026
// set the srv target`s last_failure
2027
if (t_state.dns_info.srv_lookup_success) {
2028
uint32_t last_failure = 0xFFFFFFFF;
2029
for (int i = 0; i < rr->n && last_failure != 0; ++i) {
2030
if (last_failure > rr->info[i].app.http_data.last_failure)
2031
last_failure = rr->info[i].app.http_data.last_failure;
2034
if (last_failure != 0 && (uint32_t) (now - t_state.txn_conf->down_server_timeout) < last_failure) {
2035
HostDBApplicationInfo app;
2036
app.allotment.application1 = 0;
2037
app.allotment.application2 = 0;
2038
app.http_data.last_failure = last_failure;
2039
hostDBProcessor.setby_srv(t_state.dns_info.lookup_name, 0, t_state.dns_info.srv_hostname, &app);
2016
2044
t_state.dns_info.round_robin = false;
2019
// m_s.host_db_info = m_updated_host_db_info = *rr;
2020
t_state.host_db_info = *rr;
2047
t_state.host_db_info = *ret;
2021
2048
ink_release_assert(!t_state.host_db_info.reverse_dns);
2022
2049
ink_release_assert(ats_is_ip(t_state.host_db_info.ip()));
2062
2089
process_hostdb_info((HostDBInfo *) data);
2063
2090
call_transact_and_set_next_state(NULL);
2092
case EVENT_SRV_LOOKUP:
2094
pending_action = NULL;
2095
process_srv_info((HostDBInfo *) data);
2097
char *host_name = t_state.dns_info.srv_lookup_success ? t_state.dns_info.srv_hostname : t_state.dns_info.lookup_name;
2098
HostDBProcessor::Options opt;
2099
opt.port = t_state.dns_info.srv_lookup_success ? t_state.dns_info.srv_port : t_state.server_info.port;
2100
opt.flags = (t_state.cache_info.directives.does_client_permit_dns_storing)
2101
? HostDBProcessor::HOSTDB_DO_NOT_FORCE_DNS
2102
: HostDBProcessor::HOSTDB_FORCE_DNS_RELOAD
2104
opt.timeout = (t_state.api_txn_dns_timeout_value != -1) ? t_state.api_txn_dns_timeout_value : 0;
2105
opt.host_res_style = ua_session->host_res_style;
2107
Action *dns_lookup_action_handle = hostDBProcessor.getbyname_imm(this,
2108
(process_hostdb_info_pfn) & HttpSM::
2109
process_hostdb_info,
2112
if (dns_lookup_action_handle != ACTION_RESULT_DONE) {
2113
ink_assert(!pending_action);
2114
pending_action = dns_lookup_action_handle;
2115
historical_action = pending_action;
2117
call_transact_and_set_next_state(NULL);
2065
2121
case EVENT_HOST_DB_IP_REMOVED:
2066
2122
ink_assert(!"Unexpected event from HostDB");
3747
3797
ink_assert(pending_action == NULL);
3749
3799
milestones.dns_lookup_begin = ink_get_hrtime();
3750
bool use_srv_records = HttpConfig::m_master.srv_enabled;
3800
bool use_srv_records = t_state.srv_lookup;
3752
3802
if (use_srv_records) {
3753
char* d = t_state.dns_info.srv_hostname;
3755
3805
memcpy(d, "_http._tcp.", 11); // don't copy '\0'
3756
3806
ink_strlcpy(d + 11, t_state.server_info.name, sizeof(d) - 11 ); // all in the name of performance!
3758
3808
DebugSM("dns_srv", "Beginning lookup of SRV records for origin %s", d);
3759
HTTP_SM_SET_DEFAULT_HANDLER(&HttpSM::state_srv_lookup);
3810
HostDBProcessor::Options opt;
3811
if (t_state.api_txn_dns_timeout_value != -1)
3812
opt.timeout = t_state.api_txn_dns_timeout_value;
3761
3813
Action *srv_lookup_action_handle =
3762
hostDBProcessor.getSRVbyname_imm(this, (process_srv_info_pfn) & HttpSM::process_srv_info, d,
3763
(t_state.api_txn_dns_timeout_value != -1) ? t_state.api_txn_dns_timeout_value : 0);
3814
hostDBProcessor.getSRVbyname_imm(this, (process_srv_info_pfn) & HttpSM::process_srv_info, d, 0, opt);
3765
3816
if (srv_lookup_action_handle != ACTION_RESULT_DONE) {
3766
3817
ink_assert(!pending_action);
3767
3818
pending_action = srv_lookup_action_handle;
3768
3819
historical_action = pending_action;
3821
char *host_name = t_state.dns_info.srv_lookup_success ? t_state.dns_info.srv_hostname : t_state.dns_info.lookup_name;
3822
opt.port = t_state.dns_info.srv_lookup_success ? t_state.dns_info.srv_port : t_state.server_info.port;
3823
opt.flags = (t_state.cache_info.directives.does_client_permit_dns_storing)
3824
? HostDBProcessor::HOSTDB_DO_NOT_FORCE_DNS
3825
: HostDBProcessor::HOSTDB_FORCE_DNS_RELOAD
3827
opt.timeout = (t_state.api_txn_dns_timeout_value != -1) ? t_state.api_txn_dns_timeout_value : 0;
3828
opt.host_res_style = ua_session->host_res_style;
3830
Action *dns_lookup_action_handle = hostDBProcessor.getbyname_imm(this,
3831
(process_hostdb_info_pfn) & HttpSM::
3832
process_hostdb_info,
3835
if (dns_lookup_action_handle != ACTION_RESULT_DONE) {
3836
ink_assert(!pending_action);
3837
pending_action = dns_lookup_action_handle;
3838
historical_action = pending_action;
3840
call_transact_and_set_next_state(NULL);
3771
3844
} else { /* we arent using SRV stuff... */
3772
DebugSM("http_seq", "[HttpStateMachineGet::do_hostdb_lookup] Doing DNS Lookup");
3845
DebugSM("http_seq", "[HttpSM::do_hostdb_lookup] Doing DNS Lookup");
3774
3847
// If there is not a current server, we must be looking up the origin
3775
3848
// server at the beginning of the transaction
3780
3853
t_state.api_txn_dns_timeout_value);
3783
Action *dns_lookup_action_handle = hostDBProcessor.getbyname_imm(this,
3784
(process_hostdb_info_pfn) & HttpSM::
3785
process_hostdb_info,
3786
t_state.dns_info.lookup_name, 0,
3788
((t_state.cache_info.directives.
3789
does_client_permit_dns_storing) ?
3791
HOSTDB_DO_NOT_FORCE_DNS : HostDBProcessor::
3792
HOSTDB_FORCE_DNS_RELOAD),
3793
(t_state.api_txn_dns_timeout_value != -1) ? t_state.
3794
api_txn_dns_timeout_value : 0);
3856
HostDBProcessor::Options opt;
3857
opt.port = server_port;
3858
opt.flags = (t_state.cache_info.directives.does_client_permit_dns_storing)
3859
? HostDBProcessor::HOSTDB_DO_NOT_FORCE_DNS
3860
: HostDBProcessor::HOSTDB_FORCE_DNS_RELOAD
3862
opt.timeout = (t_state.api_txn_dns_timeout_value != -1) ? t_state.api_txn_dns_timeout_value : 0;
3863
opt.host_res_style = ua_session->host_res_style;
3865
Action *dns_lookup_action_handle = hostDBProcessor.getbyname_imm(this, (process_hostdb_info_pfn) & HttpSM::process_hostdb_info, t_state.dns_info.lookup_name, 0, opt);
3796
3867
if (dns_lookup_action_handle != ACTION_RESULT_DONE) {
3797
3868
ink_assert(!pending_action);
3969
* range entry vaild [a,b] (a >= 0 and b >= 0 and a <= b)
3970
* HttpTransact::RANGE_NONE if the content length of cached copy is zero or
3972
* HttpTransact::RANGE_NOT_SATISFIABLE iff all range entrys are valid but
3973
* none overlap the current extent of the cached copy
3974
* HttpTransact::RANGE_NOT_HANDLED if out-of-order Range entrys or
3975
* the cached copy`s content_length is INT64_MAX (e.g. read_from_writer and trunked)
3976
* HttpTransact::RANGE_REQUESTED if all sub range entrys are valid and
3977
* in order (remove the entrys that not overlap the extent of cache copy)
3890
3980
HttpSM::parse_range_and_compare(MIMEField *field, int64_t content_length)
3892
// note: unsatisfiable_range is initialized to true in constructor
3893
3982
int prev_good_range = -1;
3894
3983
const char *value;
3897
3986
int nr = 0; // number of valid ranges, also index to range array.
3987
int not_satisfy = 0;
3898
3988
HdrCsvIter csv;
3989
const char *s, *e, *tmp;
3990
RangeRecord *ranges = NULL;
3993
ink_debug_assert(field != NULL && t_state.range_setup == HttpTransact::RANGE_NONE && t_state.ranges == NULL);
3901
3995
if (content_length <= 0)
3904
ink_assert(field != NULL);
3997
if (content_length == INT64_MAX) {
3998
t_state.range_setup = HttpTransact::RANGE_NOT_HANDLED;
3907
4003
value = csv.get_first(field, &value_len);
3910
4006
value = csv.get_next(&value_len);
4009
value = csv.get_first(field, &value_len);
4010
if (n_values <= 0 || ptr_len_ncmp(value, value_len, "bytes=", 6))
3916
value = csv.get_first(field, &value_len);
3918
// Currently HTTP/1.1 only defines bytes Range
3919
if (ptr_len_ncmp(value, value_len, "bytes=", 6) == 0) {
3920
t_state.ranges = NEW(new RangeRecord[n_values]);
3921
value += 6; // skip leading 'bytes='
3925
bool valid = true; // found valid range.
3926
// If delimiter '-' is missing
3927
if (!(e = (const char *) memchr(value, '-', value_len))) {
3928
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
3929
t_state.num_range_fields = -1;
3933
/* [amc] We should do a much better job of checking the values
3934
from mime_parse_int64 to detect invalid range values (e.g.
3935
non-numeric). Those need to be handled differently than
3936
missing values. My reading of the spec is that ATS should go to
3937
RANGE_NONE in such a case.
3940
t_state.ranges[nr]._start = ((s==e)?-1:mime_parse_int64(s, e));
3944
e = value + value_len;
3945
if ( e && *(e-1) == '-') { //open-ended Range: bytes=10-\r\n\r\n should be supported
3946
t_state.ranges[nr]._end = -1;
3949
t_state.ranges[nr]._end = mime_parse_int64(s, e);
3952
// check and change if necessary whether this is a right entry
3953
if (t_state.ranges[nr]._start >= content_length) {
3957
else if (t_state.ranges[nr]._start == -1 && t_state.ranges[nr]._end > 0) {
3958
if (t_state.ranges[nr]._end > content_length)
3959
t_state.ranges[nr]._end = content_length;
3961
t_state.ranges[nr]._start = content_length - t_state.ranges[nr]._end;
3962
t_state.ranges[nr]._end = content_length - 1;
3965
else if (t_state.ranges[nr]._start >= 0 && t_state.ranges[nr]._end == -1) {
3966
t_state.ranges[nr]._end = content_length - 1;
3968
// "normal" Range - could be wrong if _end<_start
3969
else if (t_state.ranges[nr]._start >= 0 && t_state.ranges[nr]._end >= 0) {
3970
if (t_state.ranges[nr]._start > t_state.ranges[nr]._end)
3971
// [amc] My reading of the spec is that this should cause a change
3972
// to RANGE_NONE because it is syntatically invalid.
3974
else if (t_state.ranges[nr]._end >= content_length)
3975
t_state.ranges[nr]._end = content_length - 1;
3977
// Syntactically invalid range, fail.
3979
// [amc] My reading of the spec is that this should cause a change
3980
// to RANGE_NONE because it is syntatically invalid.
3981
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
3982
t_state.num_range_fields = -1;
3986
// this is a good Range entry
3988
if (t_state.unsatisfiable_range) {
3989
t_state.unsatisfiable_range = false;
3990
// initialize t_state.current_range to the first good Range
3991
t_state.current_range = nr;
3993
// currently we don't handle out-of-order Range entry
3994
else if (prev_good_range >= 0 && t_state.ranges[nr]._start <= t_state.ranges[prev_good_range]._end) {
3995
t_state.not_handle_range = true;
3999
prev_good_range = nr;
4002
value = csv.get_next(&value_len);
4013
ranges = NEW(new RangeRecord[n_values]);
4014
value += 6; // skip leading 'bytes='
4017
for (; value; value = csv.get_next(&value_len)) {
4018
if (!(tmp = (const char *) memchr(value, '-', value_len))) {
4019
t_state.range_setup = HttpTransact::RANGE_NONE;
4023
// process start value
4026
// skip leading white spaces
4027
for (; s < e && ParseRules::is_ws(*s); ++s) ;
4032
for (start = 0; s < e && *s >= '0' && *s <= '9'; ++s)
4033
start = start * 10 + (*s - '0');
4034
// skip last white spaces
4035
for (; s < e && ParseRules::is_ws(*s); ++s) ;
4037
if (s < e || start < 0) {
4038
t_state.range_setup = HttpTransact::RANGE_NONE;
4043
// process end value
4045
e = value + value_len;
4046
// skip leading white spaces
4047
for (; s < e && ParseRules::is_ws(*s); ++s) ;
4051
t_state.range_setup = HttpTransact::RANGE_NONE;
4053
} else if (start >= content_length) {
4057
end = content_length - 1;
4059
for (end = 0; s < e && *s >= '0' && *s <= '9'; ++s)
4060
end = end * 10 + (*s - '0');
4061
// skip last white spaces
4062
for (; s < e && ParseRules::is_ws(*s); ++s) ;
4064
if (s < e || end < 0) {
4065
t_state.range_setup = HttpTransact::RANGE_NONE;
4070
if (end >= content_length)
4071
end = content_length;
4072
start = content_length - end;
4073
end = content_length - 1;
4074
} else if (start >= content_length && start <= end) {
4079
if (end >= content_length)
4080
end = content_length - 1;
4084
t_state.range_setup = HttpTransact::RANGE_NONE;
4088
if (prev_good_range >= 0 && start <= ranges[prev_good_range]._end) {
4089
t_state.range_setup = HttpTransact::RANGE_NOT_HANDLED;
4093
ink_debug_assert(start >= 0 && end >= 0 && start < content_length && end < content_length);
4095
prev_good_range = nr;
4096
ranges[nr]._start = start;
4097
ranges[nr]._end = end;
4005
// Fail if we didn't find any valid ranges.
4007
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
4008
t_state.num_range_fields = -1;
4102
t_state.range_setup = HttpTransact::RANGE_REQUESTED;
4103
t_state.ranges = ranges;
4010
4104
t_state.num_range_fields = nr;
4109
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
4112
t_state.num_range_fields = -1;
4082
4176
ink_assert(field != NULL);
4084
4178
t_state.range_setup = HttpTransact::RANGE_NONE;
4085
4180
if (t_state.method == HTTP_WKSIDX_GET && t_state.hdr_info.client_request.version_get() == HTTPVersion(1, 1)) {
4086
4181
do_range_parse(field);
4183
// if only one range entry and pread is capable, no need transform range
4184
if (t_state.range_setup == HttpTransact::RANGE_REQUESTED &&
4185
t_state.num_range_fields == 1 &&
4186
cache_sm.cache_read_vc->is_pread_capable())
4187
t_state.range_setup = HttpTransact::RANGE_NOT_TRANSFORM_REQUESTED;
4088
4189
if (t_state.range_setup == HttpTransact::RANGE_REQUESTED &&
4089
(t_state.num_range_fields > 1 || !cache_sm.cache_read_vc->is_pread_capable()) &&
4090
api_hooks.get(TS_HTTP_RESPONSE_TRANSFORM_HOOK) == NULL
4093
Debug("http_trans", "Unable to accelerate range request, fallback to transform");
4094
content_type = t_state.cache_info.object_read->response_get()->value_get(MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_TYPE, &field_content_type_len);
4095
//create a Range: transform processor for requests of type Range: bytes=1-2,4-5,10-100 (eg. multiple ranges)
4096
range_trans = transformProcessor.range_transform(mutex,
4098
t_state.unsatisfiable_range,
4099
t_state.num_range_fields,
4100
&t_state.hdr_info.transform_response,
4102
field_content_type_len,
4103
t_state.cache_info.object_read->object_size_get()
4105
if (range_trans != NULL) {
4106
api_hooks.append(TS_HTTP_RESPONSE_TRANSFORM_HOOK, range_trans);
4107
t_state.range_setup = HttpTransact::RANGE_REQUESTED;
4109
else { //we couldnt append the transform to our API hooks so bailing
4110
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
4113
else if (t_state.range_setup == HttpTransact::RANGE_REQUESTED && t_state.num_range_fields == 1) {
4114
Debug("http_trans", "Handling single Range: request");
4115
//no op, we will handle this later in the HttpTunnel
4118
t_state.range_setup = HttpTransact::RANGE_NOT_SATISFIABLE;
4190
api_hooks.get(TS_HTTP_RESPONSE_TRANSFORM_HOOK) == NULL) {
4191
Debug("http_trans", "Unable to accelerate range request, fallback to transform");
4192
content_type = t_state.cache_info.object_read->response_get()->value_get(MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_TYPE, &field_content_type_len);
4193
//create a Range: transform processor for requests of type Range: bytes=1-2,4-5,10-100 (eg. multiple ranges)
4194
range_trans = transformProcessor.range_transform(mutex,
4196
t_state.num_range_fields,
4197
&t_state.hdr_info.transform_response,
4199
field_content_type_len,
4200
t_state.cache_info.object_read->object_size_get()
4202
api_hooks.append(TS_HTTP_RESPONSE_TRANSFORM_HOOK, range_trans);
6691
6772
&& !t_state.url_remap_success
6692
6773
&& t_state.parent_result.r != PARENT_SPECIFIED
6693
6774
&& t_state.client_info.is_transparent
6775
&& t_state.dns_info.os_addr_style == HttpTransact::DNSLookupInfo::OS_ADDR_TRY_DEFAULT
6694
6776
&& ats_is_ip(addr = t_state.state_machine->ua_session->get_netvc()->get_local_addr())
6697
/* If the connection is client side transparent and the URL was not
6698
* remapped/directed to parent proxy, we can use the client destination
6699
* IP address instead of doing a DNS lookup. This is controlled by the
6700
* 'use_client_target_addr' configuration parameter.
6778
/* If the connection is client side transparent and the URL
6779
* was not remapped/directed to parent proxy, we can use the
6780
* client destination IP address instead of doing a DNS
6781
* lookup. This is controlled by the 'use_client_target_addr'
6782
* configuration parameter.
6702
DebugSM("dns", "[HttpTransact::HandleRequest] Skipping DNS lookup for client supplied target %s.\n", ats_ip_ntop(addr, ipb, sizeof(ipb)));
6784
if (is_debug_tag_set("dns")) {
6786
DebugSM("dns", "[HttpTransact::HandleRequest] Skipping DNS lookup for client supplied target %s.\n", ats_ip_ntop(addr, ipb, sizeof(ipb)));
6703
6788
ats_ip_copy(t_state.host_db_info.ip(), addr);
6704
6789
/* Since we won't know the server HTTP version (no hostdb lookup), we assume it matches the
6705
6790
* client request version. Seems to be the most correct thing to do in the transparent use-case.