[vlc-commits] https: minor revector

Rémi Denis-Courmont git at videolan.org
Fri Dec 18 21:07:45 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 18 21:19:33 2015 +0200| [c7a2b2bde35b34bfa57edf551734cc890d973d14] | committer: Rémi Denis-Courmont

https: minor revector

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7a2b2bde35b34bfa57edf551734cc890d973d14
---

 modules/access/http/h2frame.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/access/http/h2frame.c b/modules/access/http/h2frame.c
index 5a9504b..c5ff0d6 100644
--- a/modules/access/http/h2frame.c
+++ b/modules/access/http/h2frame.c
@@ -541,6 +541,9 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p)
     {
         p->cbs->stream_headers(s, val, headers);
         val = 0;
+
+        if (p->headers.eos)
+            p->cbs->stream_end(s);
     }
     else
     {
@@ -549,15 +552,13 @@ static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p)
             free(headers[i][0]);
             free(headers[i][1]);
         }
-        /* NOTE: The specification implies that the error should also be sent
-         * for non-last header/continuation frames, but this does not make much
-         * sense. */
+        /* NOTE: The specification implies that the error should be sent for
+         * the first header frame. But we actually want to receive the whole
+         * 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);
     }
 
-    if (p->headers.eos && s != NULL)
-        p->cbs->stream_end(s);
-
     p->parser = vlc_h2_parse_generic;
     p->headers.sid = 0;
     return val;



More information about the vlc-commits mailing list