diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-08-22 14:08:18 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-23 22:33:29 +0200 |
commit | 0a5d28fa2ec872de55c8d3f3b62675f17ca9cd45 (patch) | |
tree | 46be1169dec129df20c418b3a98b92ff7ffb4ad9 /lib/vquic/quiche.c | |
parent | 32d64b2e875f0d74cd433dff8bda9f8a98dcd44e (diff) |
ngtcp2: accept upload via callback
Closes #4256
Diffstat (limited to 'lib/vquic/quiche.c')
-rw-r--r-- | lib/vquic/quiche.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c index b84cc4779..43723a5f9 100644 --- a/lib/vquic/quiche.c +++ b/lib/vquic/quiche.c @@ -116,7 +116,7 @@ static CURLcode quiche_do(struct connectdata *conn, bool *done) return Curl_http(conn, done); } -static const struct Curl_handler Curl_handler_h3_quiche = { +static const struct Curl_handler Curl_handler_http3 = { "HTTPS", /* scheme */ ZERO_NULL, /* setup_connection */ quiche_do, /* do_it */ @@ -232,7 +232,7 @@ static CURLcode quiche_has_connected(struct connectdata *conn, conn->recv[sockindex] = h3_stream_recv; conn->send[sockindex] = h3_stream_send; - conn->handler = &Curl_handler_h3_quiche; + conn->handler = &Curl_handler_http3; conn->bits.multiplex = TRUE; /* at least potentially multiplexed */ conn->httpversion = 30; conn->bundle->multiuse = BUNDLE_MULTIPLEX; @@ -750,5 +750,19 @@ fail: return result; } +/* + * Called from transfer.c:done_sending when we stop HTTP/3 uploading. + */ +CURLcode Curl_quic_done_sending(struct connectdata *conn) +{ + if(conn->handler == &Curl_handler_http3) { + /* only for HTTP/3 transfers */ + struct HTTP *stream = conn->data->req.protop; + fprintf(stderr, "!!! Curl_quic_done_sending\n"); + stream->upload_done = TRUE; + } + + return CURLE_OK; +} #endif |