Commit 3271c51e authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Ignore missing reason in probe responses

Fixes #2069
parent e8947692
......@@ -226,7 +226,7 @@ vbp_poke(struct vbp_target *vt)
i = sscanf(vt->resp_buf, "HTTP/%*f %u %s", &resp, buf);
if (i == 2 && resp == vt->probe.exp_status)
if (i >= 1 && resp == vt->probe.exp_status)
vt->happy |= 1;
}
......
varnishtest "Probe response without a reason"
server s1 -repeat 20 {
rxreq
send "HTTP/1.1 200\r\n\r\n"
} -start
varnish v1 -vcl {
backend s1 {
.host = "${s1_addr}";
.port = "${s1_port}";
.probe = {
.initial = 0;
.window = 5;
.threshold = 5;
.interval = 100ms;
}
}
sub vcl_recv {
if (req.backend.healthy) {
error 200 "Backend healthy";
}
else {
error 500 "Backend sick";
}
}
} -start
delay 1
client c1 {
txreq
rxresp
expect resp.status == 200
} -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment