Commit 03602d9f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't panic if people send us HTTP2.0 when it is not enabled.

Explains some of #2117 and friends
parent 272fc957
......@@ -401,10 +401,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
if (H2_prism_complete(req->htc) == HTC_S_COMPLETE) {
if (!FEATURE(FEATURE_HTTP2)) {
VSLb(req->vsl, SLT_Debug,
"H2 attempt");
assert(req->doclose > 0);
SES_Close(req->sp, req->doclose);
SES_Close(req->sp, SC_REQ_HTTP20);
http1_setstate(sp, H1CLEANUP);
continue;
}
......@@ -412,8 +409,7 @@ HTTP1_Session(struct worker *wrk, struct req *req)
"H2 Prior Knowledge Upgrade");
http1_setstate(sp, NULL);
req->err_code = 1;
SES_SetTransport(wrk, sp, req,
&H2_transport);
SES_SetTransport(wrk, sp, req, &H2_transport);
return;
}
......
......@@ -44,7 +44,8 @@ SESS_CLOSE(TX_EOF, tx_eof, 0, "EOF transmission")
SESS_CLOSE(RESP_CLOSE, resp_close, 0, "Backend/VCL requested close")
SESS_CLOSE(OVERLOAD, overload, 1, "Out of some resource")
SESS_CLOSE(PIPE_OVERFLOW, pipe_overflow,1, "Session pipe overflow")
SESS_CLOSE(RANGE_SHORT, range_short, 1, "Insufficient data for range")
SESS_CLOSE(RANGE_SHORT, range_short, 1, "Insufficient data for range")
SESS_CLOSE(REQ_HTTP20, req_http20, 1, "HTTP2 not accepted")
#undef SESS_CLOSE
/*lint -restore */
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