aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorJavier Blazquez <jblazquez@riotgames.com>2019-11-15 23:57:45 -0800
committerDaniel Stenberg <daniel@haxx.se>2019-11-18 16:40:08 +0100
commite0363a47de4972c7d23d87b8f75a683cf0c4271b (patch)
tree129f3bc86535044759da6d9bc5e7d28b8bff1f0d /lib/transfer.c
parent425c572a19b169df4b2b8eed18f64781ab32e3c0 (diff)
ngtcp2: use overflow buffer for extra HTTP/3 data
Fixes #4525 Closes #4603
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index d0d4aeb50..f16e29bdb 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -484,8 +484,9 @@ CURLcode Curl_readrewind(struct connectdata *conn)
return CURLE_OK;
}
-static int data_pending(const struct connectdata *conn)
+static int data_pending(const struct Curl_easy *data)
{
+ struct connectdata *conn = data->conn;
/* in the case of libssh2, we can never be really sure that we have emptied
its internal buffers so we MUST always try until we get EAGAIN back */
return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) ||
@@ -499,6 +500,8 @@ static int data_pending(const struct connectdata *conn)
be called and we cannot signal the HTTP/2 stream has closed. As
a workaround, we return nonzero here to call http2_recv. */
((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion >= 20);
+#elif defined(ENABLE_QUIC)
+ Curl_ssl_data_pending(conn, FIRSTSOCKET) || Curl_quic_data_pending(data);
#else
Curl_ssl_data_pending(conn, FIRSTSOCKET);
#endif
@@ -918,7 +921,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
break;
}
- } while(data_pending(conn) && maxloops--);
+ } while(data_pending(data) && maxloops--);
if(maxloops <= 0) {
/* we mark it as read-again-please */