MINOR: checks: Skip some headers for http-check send rules
Connection, content-length and transfer-encoding headers are ignored for
http-check send rules. For now, the keep-alive is not supported and the
"connection: close" header is always added to the request. And the
content-length header is automatically added.
diff --git a/src/checks.c b/src/checks.c
index 2ca1aca..3b22ada 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -3785,10 +3785,15 @@
}
host_hdr = i;
}
+ else if (strcasecmp(args[cur_arg+1], "connection") == 0 ||
+ strcasecmp(args[cur_arg+1], "content-length") == 0 ||
+ strcasecmp(args[cur_arg+1], "transfer-encoding") == 0)
+ goto skip_hdr;
hdrs[i].n = ist2(args[cur_arg+1], strlen(args[cur_arg+1]));
hdrs[i].v = ist2(args[cur_arg+2], strlen(args[cur_arg+2]));
i++;
+ skip_hdr:
cur_arg += 2;
}
else if (strcmp(args[cur_arg], "body") == 0) {