Commit 58fefad0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Emit minimal 500 response if vcl_synth{} fails.

With the synth->filters koncept out of the picture this becomes
possible.

Fixes: #3441
parent 4c591127
......@@ -329,7 +329,9 @@ cnt_synth(struct worker *wrk, struct req *req)
if (wrk->handling == VCL_RET_FAIL) {
VSB_destroy(&synth_body);
req->doclose = SC_VCL_FAILURE;
(void)VRB_Ignore(req);
(void)req->transport->minimal_response(req, 500);
req->doclose = SC_VCL_FAILURE; // XXX: Not necessary any more ?
VSLb_ts_req(req, "Resp", W_TIM_real(wrk));
http_Teardown(req->resp);
return (REQ_FSM_DONE);
......
......@@ -47,6 +47,8 @@ logexpect l1 -v v1 {
# This should fail with default params and JIT/no-JIT
client c1 {
txreq -url "/${string,repeat,8192,AB}"
rxresp
expect resp.status == 500
expect_close
} -run
......
......@@ -154,6 +154,8 @@ client c1 {
client c1 {
txreq -url synth
rxresp
expect resp.status == 500
expect_close
} -run
......
......@@ -35,6 +35,8 @@ client c1 {
expect resp.http.bar == "bar"
txreq -url "/empty"
rxresp
expect resp.status == 500
expect_close
} -run
......
......@@ -150,6 +150,8 @@ logexpect l1007 -v v1 -g raw {
client c1 {
txreq -hdr "foo: synth"
rxresp
expect resp.status == 500
expect_close
} -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