mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-28 01:26:59 -04:00
CLEANUP: fcgi: Use istadv() in fcgi_strm_send_params
Found manually, while creating the previous commits to turn `struct proxy`
members into ists.
There is an existing Coccinelle rule to replace this pattern by `istadv()` in
`ist.cocci`:
@@
struct ist i;
expression e;
@@
- i.ptr += e;
- i.len -= e;
+ i = istadv(i, e);
But apparently it is not smart enough to match ists that are stored in another
struct. It would be useful to make the existing rule more generic, so that it
might catch similar cases in the future.
This commit is contained in:
parent
98f05f6a38
commit
a6a3279188
1 changed files with 1 additions and 2 deletions
|
|
@ -1980,8 +1980,7 @@ static size_t fcgi_strm_send_params(struct fcgi_conn *fconn, struct fcgi_strm *f
|
|||
p.v = htx_get_blk_value(htx, blk);
|
||||
|
||||
if (istmatch(p.n, ist(":fcgi-"))) {
|
||||
p.n.ptr += 6;
|
||||
p.n.len -= 6;
|
||||
p.n = istadv(p.n, 6);
|
||||
if (isteq(p.n, ist("gateway_interface")))
|
||||
params.mask |= FCGI_SP_CGI_GATEWAY;
|
||||
else if (isteq(p.n, ist("document_root"))) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue