[libsoup/carlosgc/http2-early-hints: 2/2] http2: stay in read headers state after receiving an informational response




commit a0ad95ab24c80c7b6c1726f64e644659f55092a0
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Mar 21 15:12:33 2022 +0100

    http2: stay in read headers state after receiving an informational response
    
    Since we expect more response to come. Add default reason phrase for 103
    status to be shown in the logger, but don't expose early hints yet since
    it's still experimental RFC.

 libsoup/http2/soup-client-message-io-http2.c | 1 -
 libsoup/soup-status.c                        | 1 +
 2 files 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 33869caf..c1f12f28 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -700,7 +700,6 @@ on_frame_recv_callback (nghttp2_session     *session,
                         if (SOUP_STATUS_IS_INFORMATIONAL (soup_message_get_status (data->msg))) {
                                 soup_message_got_informational (data->msg);
                                 soup_message_cleanup_response (data->msg);
-                                advance_state_from (data, STATE_READ_HEADERS, STATE_READ_DONE);
                                 io->in_callback--;
                                 return 0;
                         }
diff --git a/libsoup/soup-status.c b/libsoup/soup-status.c
index 02baf113..3817ad4b 100644
--- a/libsoup/soup-status.c
+++ b/libsoup/soup-status.c
@@ -160,6 +160,7 @@ static const struct {
        { SOUP_STATUS_CONTINUE,                   "Continue" },
        { SOUP_STATUS_SWITCHING_PROTOCOLS,        "Switching Protocols" },
        { SOUP_STATUS_PROCESSING,                 "Processing" },
+        { 103,                                    "Early Hints" },
 
        /* Success */
        { SOUP_STATUS_OK,                         "OK" },


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