[libsoup/carlosgc/http2-closed-stream-warning] http2: do not show a warning when RST_STREAM is received on a closed stream




commit 6a8b9d0aa0d186631ea7af4f00a0d6f52888e9ec
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Wed Nov 10 14:50:11 2021 +0100

    http2: do not show a warning when RST_STREAM is received on a closed stream
    
    According to the spec a stream that is half-closed can transition to
    closed state when a frame that contains an END_STREAM flag is received
    or when either peer sends a RST_STREAM frame.

 libsoup/http2/soup-client-message-io-http2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 5e7f0665..e66a72cc 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -659,7 +659,7 @@ on_frame_recv_callback (nghttp2_session     *session,
         h2_debug (io, data, "[RECV] [%s] Recieved (%u)", frame_type_to_string (frame->hd.type), 
frame->hd.flags);
 
         if (!data) {
-                if (!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM))
+                if (!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM) && frame->hd.type != NGHTTP2_RST_STREAM)
                         g_warn_if_reached ();
                 return 0;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]