diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-08-23 17:47:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-26 09:25:00 +0200 |
commit | bbd41c539e20b72fd16584f4877e7a54031a5b24 (patch) | |
tree | 5e12b4a05224d86faa3fafd0632630acc25fff31 | |
parent | aae22fdbd51cf344fe30d7c53fe98238545a53aa (diff) | |
download | curl-bagder/quiche-upload.tar.gz |
quiche: send the HTTP body correctly on callback uploadsbagder/quiche-upload
-rw-r--r-- | lib/vquic/quiche.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c index 43723a5f9..a17bd6a1c 100644 --- a/lib/vquic/quiche.c +++ b/lib/vquic/quiche.c @@ -498,7 +498,10 @@ static ssize_t h3_stream_send(struct connectdata *conn, sent = len; } else { - sent = quiche_conn_stream_send(qs->conn, 0, mem, len, true); + H3BUGF(infof(conn->data, "Pass on %zd body bytes to quiche\n", + len)); + sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id, + (uint8_t *)mem, len, FALSE); if(sent < 0) { *curlcode = CURLE_SEND_ERROR; return -1; @@ -757,9 +760,15 @@ CURLcode Curl_quic_done_sending(struct connectdata *conn) { if(conn->handler == &Curl_handler_http3) { /* only for HTTP/3 transfers */ + ssize_t sent; struct HTTP *stream = conn->data->req.protop; + struct quicsocket *qs = conn->quic; fprintf(stderr, "!!! Curl_quic_done_sending\n"); stream->upload_done = TRUE; + sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id, + NULL, 0, TRUE); + if(sent < 0) + return CURLE_SEND_ERROR; } return CURLE_OK; |