summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/vquic/quiche.c
diff options
context:
space:
mode:
authordartraiden <dartraiden@protonmail.com>2020-01-12 14:12:42 +0300
committerdartraiden <dartraiden@protonmail.com>2020-01-12 14:14:27 +0300
commit69d3b201c14db069ad0aef4b21e8efb45e21df9b (patch)
tree9c168030e03459dfe2d2d6cf64511321786b41f8 /libs/libcurl/src/vquic/quiche.c
parentdcb62e4830223c1f5233d90b855e74006fd0942b (diff)
libcurl: update to 7.68
Diffstat (limited to 'libs/libcurl/src/vquic/quiche.c')
-rw-r--r--libs/libcurl/src/vquic/quiche.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/libs/libcurl/src/vquic/quiche.c b/libs/libcurl/src/vquic/quiche.c
index 0ee360d07f..e2f43237fa 100644
--- a/libs/libcurl/src/vquic/quiche.c
+++ b/libs/libcurl/src/vquic/quiche.c
@@ -45,7 +45,7 @@
#ifdef DEBUG_HTTP3
#define H3BUGF(x) x
#else
-#define H3BUGF(x) do { } WHILE_FALSE
+#define H3BUGF(x) do { } while(0)
#endif
#define QUIC_MAX_STREAMS (256*1024)
@@ -379,6 +379,9 @@ static int cb_each_header(uint8_t *name, size_t name_len,
headers->destlen, "HTTP/3 %.*s\n",
(int) value_len, value);
}
+ else if(!headers->nlen) {
+ return CURLE_HTTP3;
+ }
else {
msnprintf(headers->dest,
headers->destlen, "%.*s: %.*s\n",
@@ -433,7 +436,9 @@ static ssize_t h3_stream_recv(struct connectdata *conn,
case QUICHE_H3_EVENT_HEADERS:
rc = quiche_h3_event_for_each_header(ev, cb_each_header, &headers);
if(rc) {
- /* what do we do about this? */
+ *curlcode = rc;
+ failf(data, "Error in HTTP/3 response header");
+ break;
}
recvd = headers.nlen;
break;
@@ -780,4 +785,23 @@ CURLcode Curl_quic_done_sending(struct connectdata *conn)
return CURLE_OK;
}
+/*
+ * Called from http.c:Curl_http_done when a request completes.
+ */
+void Curl_quic_done(struct Curl_easy *data, bool premature)
+{
+ (void)data;
+ (void)premature;
+}
+
+/*
+ * Called from transfer.c:data_pending to know if we should keep looping
+ * to receive more data from the connection.
+ */
+bool Curl_quic_data_pending(const struct Curl_easy *data)
+{
+ (void)data;
+ return FALSE;
+}
+
#endif