Commit d653365f authored by Carlo Cannas's avatar Carlo Cannas Committed by Dridi Boukelmoune

Move header block frame sequence check earlier

This moves it before the new stream object creation, so we save ourselves an
useless allocation and initialization of a stream object which would be never
used and straight killed.

This also simplifies upcoming commits.
parent faec2d33
......@@ -923,6 +923,10 @@ h2_procframe(struct worker *wrk, struct h2_sess *h2, h2_frame h2f)
if (r2->stream == h2->rxf_stream)
break;
if (h2->new_req != NULL &&
!(r2 && h2->new_req == r2->req && h2f == H2_F_CONTINUATION))
return (H2CE_PROTOCOL_ERROR); // rfc7540,l,1859,1863
if (r2 == NULL && h2f->act_sidle == 0) {
if (h2->rxf_stream <= h2->highest_stream)
return (H2CE_PROTOCOL_ERROR); // rfc7540,l,1153,1158
......@@ -940,10 +944,6 @@ h2_procframe(struct worker *wrk, struct h2_sess *h2, h2_frame h2f)
AN(r2);
}
if (h2->new_req != NULL &&
!(r2 && h2->new_req == r2->req && h2f == H2_F_CONTINUATION))
return (H2CE_PROTOCOL_ERROR); // rfc7540,l,1859,1863
h2e = h2f->rxfunc(wrk, h2, r2);
if (h2e == 0)
return (0);
......
......@@ -30,7 +30,7 @@ client c1 {
} -run
stream 0 {
rxgoaway
expect goaway.laststream == "3"
expect goaway.laststream == "1"
expect goaway.err == PROTOCOL_ERROR
} -run
} -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