summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-06-24 11:21:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-06-24 23:11:37 +0200
commit265f7f42f678db4157e7d6f7f987aba01e71cfeb (patch)
tree94f2263232e44b630a95e5b4d16a2e139d3476b6 /lib/http2.c
parentd331227cf0a0f4a1ae4b97081ed2fd2c55164489 (diff)
downloadcurl-265f7f42f678db4157e7d6f7f987aba01e71cfeb.tar.gz
http2: call done_sending on end of upload
To make sure a HTTP/2 stream registers the end of stream. Bug #4043 made me find this problem but this fix doesn't correct the reported issue. Closes #4068
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c
index b016bac92..bbd42bf2f 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1880,7 +1880,11 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
are going to send or sending request body in DATA frame */
stream->upload_mem = mem;
stream->upload_len = len;
- nghttp2_session_resume_data(h2, stream->stream_id);
+ rv = nghttp2_session_resume_data(h2, stream->stream_id);
+ if(nghttp2_is_fatal(rv)) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
rv = h2_session_send(conn->data, h2);
if(nghttp2_is_fatal(rv)) {
*err = CURLE_SEND_ERROR;