Commit f12d4c02 authored by Dag Haavi Finstad's avatar Dag Haavi Finstad Committed by Dridi Boukelmoune

h2: Move the frame completion check up

Avoid failing sessions with pipelined data.
parent ab6cf6cf
......@@ -830,11 +830,12 @@ h2_frame_complete(struct http_conn *htc)
if (l < 9)
return (HTC_S_MORE);
u = vbe32dec(htc->rxbuf_b) >> 8;
if (l > h2->local_settings.max_frame_size + 9)
if (l >= u + 9)
return (HTC_S_COMPLETE);
else if (l > h2->local_settings.max_frame_size + 9)
return (HTC_S_OVERFLOW);
if (l < u + 9) // XXX: Only for !DATA frames
return (HTC_S_MORE);
return (HTC_S_COMPLETE);
return (HTC_S_MORE);
}
/**********************************************************************/
......
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