Commit c7a2b2bd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

https: minor revector

parent 0c73679a
...@@ -541,6 +541,9 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p) ...@@ -541,6 +541,9 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p)
{ {
p->cbs->stream_headers(s, val, headers); p->cbs->stream_headers(s, val, headers);
val = 0; val = 0;
if (p->headers.eos)
p->cbs->stream_end(s);
} }
else else
{ {
...@@ -549,15 +552,13 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p) ...@@ -549,15 +552,13 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p)
free(headers[i][0]); free(headers[i][0]);
free(headers[i][1]); free(headers[i][1]);
} }
/* NOTE: The specification implies that the error should also be sent /* NOTE: The specification implies that the error should be sent for
* for non-last header/continuation frames, but this does not make much * the first header frame. But we actually want to receive the whole
* sense. */ * fragmented headers block, to preserve the HPACK decoder state.
* So we send the error at the last header frame instead. */
val = vlc_h2_stream_error(p, p->headers.sid, VLC_H2_REFUSED_STREAM); val = vlc_h2_stream_error(p, p->headers.sid, VLC_H2_REFUSED_STREAM);
} }
if (p->headers.eos && s != NULL)
p->cbs->stream_end(s);
p->parser = vlc_h2_parse_generic; p->parser = vlc_h2_parse_generic;
p->headers.sid = 0; p->headers.sid = 0;
return val; return val;
......
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