goto full;
sl->info.res.status = 200;
if (!htx_add_header(htx, ist("Cache-Control"), ist("no-cache")) ||
- !htx_add_header(htx, ist("Connection"), ist("close")) ||
!htx_add_header(htx, ist("Content-Type"), ist("text/plain; version=0.0.4")) ||
!htx_add_header(htx, ist("Transfer-Encoding"), ist("chunked")) ||
!htx_add_endof(htx, HTX_BLK_EOH))
expect resp.body ~ ".*haproxy_frontend.*"
expect resp.body ~ ".*haproxy_backend.*"
expect resp.body ~ ".*haproxy_server.*"
-} -run
-
-client c2 -connect ${h1_stats_sock} {
- txreq -url "/metrics?scope"
- rxresp
- expect resp.status == 400
-} -run
-client c3 -connect ${h1_stats_sock} {
txreq -url "/metrics?scope="
rxresp
expect resp.status == 200
expect resp.bodylen == 0
-} -run
-client c4 -connect ${h1_stats_sock} {
txreq -url "/metrics?scope=server"
rxresp
expect resp.status == 200
expect resp.body !~ ".*haproxy_frontend.*"
expect resp.body !~ ".*haproxy_backend.*"
expect resp.body ~ ".*haproxy_server.*"
-} -run
-client c5 -connect ${h1_stats_sock} {
txreq -url "/metrics?scope=frontend&scope=backend"
rxresp
expect resp.status == 200
expect resp.body ~ ".*haproxy_frontend.*"
expect resp.body ~ ".*haproxy_backend.*"
expect resp.body !~ ".*haproxy_server.*"
+
+ txreq -url "/metrics?scope"
+ rxresp
+ expect resp.status == 400
} -run