[libsoup] io-http2: show debug message after switching state to STATE_WRITE_DATA



commit c1fc3a56ef230a0f91caeed10cf053d9ea2ce6f6
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue May 25 17:21:05 2021 +0200

    io-http2: show debug message after switching state to STATE_WRITE_DATA
    
    It's confusing to see a send data frame on STATE_WRITE_HEADERS.

 libsoup/http2/soup-client-message-io-http2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 937cf2a0..e7695b83 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -514,10 +514,11 @@ on_frame_send_callback (nghttp2_session     *session,
                 }
                 break;
         case NGHTTP2_DATA:
-                h2_debug (user_data, data, "[SEND] [DATA] bytes=%zu, finished=%d",
-                          frame->data.hd.length, frame->hd.flags & NGHTTP2_FLAG_END_STREAM);
                 if (data->state < STATE_WRITE_DATA)
                         advance_state_from (data, STATE_WRITE_HEADERS, STATE_WRITE_DATA);
+
+                h2_debug (user_data, data, "[SEND] [DATA] bytes=%zu, finished=%d",
+                          frame->data.hd.length, frame->hd.flags & NGHTTP2_FLAG_END_STREAM);
                 if (data->metrics) {
                         data->metrics->request_body_bytes_sent += frame->hd.length + FRAME_HEADER_SIZE;
                         data->metrics->request_body_size += frame->data.hd.length;


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