mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
CLEANUP: Apply ist.cocci
This is to make use of `chunk_istcat()`.
This commit is contained in:
parent
b9656e4837
commit
9f7ed8a60c
@ -1644,7 +1644,7 @@ int sha1_hosturi(struct stream *s)
|
||||
chunk_istcat(trash, ctx.value);
|
||||
}
|
||||
|
||||
chunk_memcat(trash, uri.ptr, uri.len);
|
||||
chunk_istcat(trash, uri);
|
||||
|
||||
/* hash everything */
|
||||
blk_SHA1_Init(&sha1_ctx);
|
||||
|
||||
@ -874,7 +874,7 @@ static int smp_fetch_hdr_names(const struct arg *args, struct sample *smp, const
|
||||
|
||||
if (temp->data)
|
||||
temp->area[temp->data++] = del;
|
||||
chunk_memcat(temp, n.ptr, n.len);
|
||||
chunk_istcat(temp, n);
|
||||
}
|
||||
|
||||
smp->data.type = SMP_T_STR;
|
||||
|
||||
@ -432,7 +432,7 @@ int http_replace_req_path(struct htx *htx, const struct ist path, int with_qs)
|
||||
vsn = ist2(temp->area + meth.len, HTX_SL_REQ_VLEN(sl));
|
||||
|
||||
chunk_memcat(temp, uri.ptr, p.ptr - uri.ptr); /* uri: host part */
|
||||
chunk_memcat(temp, path.ptr, path.len); /* uri: new path */
|
||||
chunk_istcat(temp, path); /* uri: new path */
|
||||
chunk_memcat(temp, p.ptr + plen, p.len - plen); /* uri: QS part */
|
||||
uri = ist2(temp->area + meth.len + vsn.len, uri.len - plen + path.len);
|
||||
|
||||
@ -711,7 +711,7 @@ int http_update_authority(struct htx *htx, struct htx_sl *sl, const struct ist h
|
||||
vsn = ist2(temp->area + meth.len, HTX_SL_REQ_VLEN(sl));
|
||||
|
||||
chunk_memcat(temp, uri.ptr, authority.ptr - uri.ptr);
|
||||
chunk_memcat(temp, host.ptr, host.len);
|
||||
chunk_istcat(temp, host);
|
||||
chunk_memcat(temp, istend(authority), istend(uri) - istend(authority));
|
||||
uri = ist2(temp->area + meth.len + vsn.len, host.len + uri.len - authority.len); /* uri */
|
||||
|
||||
|
||||
@ -1242,17 +1242,17 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst
|
||||
if (!(params->mask & FCGI_SP_REQ_METH)) {
|
||||
p = htx_sl_req_meth(sl);
|
||||
params->meth = ist2(b_tail(params->p), p.len);
|
||||
chunk_memcat(params->p, p.ptr, p.len);
|
||||
chunk_istcat(params->p, p);
|
||||
}
|
||||
if (!(params->mask & FCGI_SP_REQ_URI)) {
|
||||
p = h1_get_uri(sl);
|
||||
params->uri = ist2(b_tail(params->p), p.len);
|
||||
chunk_memcat(params->p, p.ptr, p.len);
|
||||
chunk_istcat(params->p, p);
|
||||
}
|
||||
if (!(params->mask & FCGI_SP_SRV_PROTO)) {
|
||||
p = htx_sl_req_vsn(sl);
|
||||
params->vsn = ist2(b_tail(params->p), p.len);
|
||||
chunk_memcat(params->p, p.ptr, p.len);
|
||||
chunk_istcat(params->p, p);
|
||||
}
|
||||
if (!(params->mask & FCGI_SP_SRV_PORT)) {
|
||||
char *end;
|
||||
@ -1361,7 +1361,7 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst
|
||||
/* Decode the path. it must first be copied to keep the URI
|
||||
* untouched.
|
||||
*/
|
||||
chunk_memcat(params->p, path.ptr, path.len);
|
||||
chunk_istcat(params->p, path);
|
||||
path.ptr = b_tail(params->p) - path.len;
|
||||
len = url_decode(ist0(path), 0);
|
||||
if (len < 0)
|
||||
@ -1415,7 +1415,7 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst
|
||||
struct ist sn = params->scriptname;
|
||||
|
||||
params->scriptname = ist2(b_tail(params->p), len+fconn->app->index.len);
|
||||
chunk_memcat(params->p, sn.ptr, sn.len);
|
||||
chunk_istcat(params->p, sn);
|
||||
chunk_memcat(params->p, fconn->app->index.ptr, fconn->app->index.len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ static void tcpcheck_expect_onerror_message(struct buffer *msg, struct check *ch
|
||||
* 4. Otherwise produce the generic tcp-check info message
|
||||
*/
|
||||
if (istlen(info)) {
|
||||
chunk_strncat(msg, istptr(info), istlen(info));
|
||||
chunk_istcat(msg, info);
|
||||
goto comment;
|
||||
}
|
||||
else if (!LIST_ISEMPTY(&rule->expect.onerror_fmt)) {
|
||||
@ -517,7 +517,7 @@ static void tcpcheck_expect_onsuccess_message(struct buffer *msg, struct check *
|
||||
* 4. Otherwise produce the generic tcp-check info message
|
||||
*/
|
||||
if (istlen(info))
|
||||
chunk_strncat(msg, istptr(info), istlen(info));
|
||||
chunk_istcat(msg, info);
|
||||
if (!LIST_ISEMPTY(&rule->expect.onsuccess_fmt))
|
||||
msg->data += sess_build_logline(check->sess, NULL, b_tail(msg), b_room(msg),
|
||||
&rule->expect.onsuccess_fmt);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user