[libsoup] io-http2: emit SoupMessage::got-body when the stream has been read
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] io-http2: emit SoupMessage::got-body when the stream has been read
- Date: Thu, 20 May 2021 16:15:54 +0000 (UTC)
commit f72af40c670a21c0f432d679d78b2a3f0133b918
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu May 20 18:08:05 2021 +0200
io-http2: emit SoupMessage::got-body when the stream has been read
This is what http1 does, so probably what users expect.
libsoup/http2/soup-client-message-io-http2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index 1b3d8700..13fe9b05 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -423,10 +423,8 @@ on_frame_recv_callback (nghttp2_session *session,
case NGHTTP2_DATA:
if (data->metrics)
data->metrics->response_body_bytes_received += frame->data.hd.length +
FRAME_HEADER_SIZE;
- if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
+ if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM)
soup_body_input_stream_http2_complete (SOUP_BODY_INPUT_STREAM_HTTP2
(data->body_istream));
- soup_message_got_body (data->msg);
- }
break;
case NGHTTP2_RST_STREAM:
if (frame->rst_stream.error_code != NGHTTP2_NO_ERROR) {
@@ -1045,6 +1043,7 @@ client_stream_eof (SoupClientInputStream *stream,
SoupHTTP2MessageData *data = get_data_for_message (io, msg);
h2_debug (io, data, "Client stream EOF");
advance_state_from (data, STATE_READ_DATA, STATE_READ_DONE);
+ soup_message_got_body (data->msg);
}
static GInputStream *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]