This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new a34df6e214 Arena: Avoid use of temporary. (#10941)
a34df6e214 is described below
commit a34df6e21408780d2abf9b6bdfdd7bce4a67f4f6
Author: Alan M. Carroll <[email protected]>
AuthorDate: Mon Dec 18 12:33:18 2023 -0600
Arena: Avoid use of temporary. (#10941)
---
src/proxy/http/HttpTransact.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index cb5816ace9..f472313487 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -930,14 +930,13 @@ HttpTransact::OriginDown(State *s)
bootstrap_state_variables_from_request(s, &s->hdr_info.client_request);
build_error_response(s, HTTP_STATUS_BAD_GATEWAY, "Origin Server Marked
Down", "connect#failed_connect");
Metrics::Counter::increment(http_rsb.down_server_no_requests);
- char *url_str = s->hdr_info.client_request.url_string_get(&s->arena);
+ char *url_str = s->hdr_info.client_request.url_string_get_ref(nullptr);
int host_len;
const char *host_name_ptr = s->unmapped_url.host_get(&host_len);
std::string_view host_name{host_name_ptr, size_t(host_len)};
swoc::bwprint(error_bw_buffer, "CONNECT: down server no request to {} for
host='{}' url='{}'", s->current.server->dst_addr,
host_name, swoc::bwf::FirstOf(url_str, "<none>"));
Log::error("%s", error_bw_buffer.c_str());
- s->arena.str_free(url_str);
TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, nullptr);
}