mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-14 16:09:17 +02:00
MINOR: proxy: Store monitor_uri as a struct ist
The monitor_uri is already processed as an ist in `http_wait_for_request`, lets
also just store it as such.
see 0643b0e7e ("MINOR: proxy: Make `header_unique_id` a `struct ist`") for a
very similar past commit.
This commit is contained in:
committed by
Willy Tarreau
parent
5ce1299c64
commit
4b1fcaaee3
11
src/proxy.c
11
src/proxy.c
@@ -156,7 +156,7 @@ void free_proxy(struct proxy *p)
|
||||
free(p->lbprm.arg_str);
|
||||
free(p->server_state_file_name);
|
||||
free(p->capture_name);
|
||||
free(p->monitor_uri);
|
||||
istfree(&p->monitor_uri);
|
||||
free(p->rdp_cookie_name);
|
||||
free(p->invalid_rep);
|
||||
free(p->invalid_req);
|
||||
@@ -1274,7 +1274,7 @@ int proxy_cfg_ensure_no_http(struct proxy *curproxy)
|
||||
ha_warning("cookie will be ignored for %s '%s' (needs 'mode http').\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
}
|
||||
if (curproxy->monitor_uri != NULL) {
|
||||
if (isttest(curproxy->monitor_uri)) {
|
||||
ha_warning("monitor-uri will be ignored for %s '%s' (needs 'mode http').\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
}
|
||||
@@ -1436,7 +1436,7 @@ void proxy_free_defaults(struct proxy *defproxy)
|
||||
ha_free(&defproxy->cookie_attrs);
|
||||
ha_free(&defproxy->lbprm.arg_str);
|
||||
ha_free(&defproxy->capture_name);
|
||||
ha_free(&defproxy->monitor_uri);
|
||||
istfree(&defproxy->monitor_uri);
|
||||
ha_free(&defproxy->defbe.name);
|
||||
ha_free(&defproxy->conn_src.iface_name);
|
||||
ha_free(&defproxy->fwdfor_hdr_name); defproxy->fwdfor_hdr_len = 0;
|
||||
@@ -1711,9 +1711,8 @@ static int proxy_defproxy_cpy(struct proxy *curproxy, const struct proxy *defpro
|
||||
curproxy->timeout.tarpit = defproxy->timeout.tarpit;
|
||||
curproxy->timeout.httpreq = defproxy->timeout.httpreq;
|
||||
curproxy->timeout.httpka = defproxy->timeout.httpka;
|
||||
if (defproxy->monitor_uri)
|
||||
curproxy->monitor_uri = strdup(defproxy->monitor_uri);
|
||||
curproxy->monitor_uri_len = defproxy->monitor_uri_len;
|
||||
if (isttest(defproxy->monitor_uri))
|
||||
curproxy->monitor_uri = istdup(defproxy->monitor_uri);
|
||||
if (defproxy->defbe.name)
|
||||
curproxy->defbe.name = strdup(defproxy->defbe.name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user