summaryrefslogtreecommitdiff
path: root/lib/http.h
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2023-03-30 13:00:51 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-03-31 15:44:57 +0200
commit544abeea83f8fc088425ea835998eaeb1bcca5ba (patch)
tree47c0aadfa57ef208dddebd6d411a40653da0a501 /lib/http.h
parenta094ec1a85fd82e86a0e2cc40d9cf699ee2003d1 (diff)
downloadcurl-544abeea83f8fc088425ea835998eaeb1bcca5ba.tar.gz
http3: improvements across backends
- ngtcp2: using bufq for recv stream data - internal stream_ctx instead of `struct HTTP` members for quiche, ngtcp2 and msh3 - no more QUIC related members in `struct HTTP` - experimental use of recvmmsg(), disabled by default - testing on my old debian box shows no throughput improvements. - leaving it in, but disabled, for future revisit - vquic: common UDP receive code for ngtcp2 and quiche - vquic: common UDP send code for ngtcp2 and quiche - added pytest skips for known msh3 failures - fix unit2601 to survive torture testing - quiche: using latest `master` from quiche and enabling large download tests, now that key change is supported - fixing test_07_21 where retry handling of starting a stream was faulty - msh3: use bufq for recv buffering headers and data - msh3: replace fprintf debug logging with LOG_CF where possible - msh3: force QUIC expire timers on recv/send to have more than 1 request per second served Closes #10772
Diffstat (limited to 'lib/http.h')
-rw-r--r--lib/http.h53
1 files changed, 2 insertions, 51 deletions
diff --git a/lib/http.h b/lib/http.h
index b9a2e6149..0c67a774f 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -185,10 +185,6 @@ CURLcode Curl_http_auth_act(struct Curl_easy *data);
#endif /* CURL_DISABLE_HTTP */
-#ifdef USE_NGHTTP3
-struct h3out; /* see ngtcp2 */
-#endif
-
/****************************************************************************
* HTTP unique setup
***************************************************************************/
@@ -216,6 +212,8 @@ struct HTTP {
HTTPSEND_BODY /* sending body */
} sending;
+ void *impl_ctx; /* context for actual HTTP implementation */
+
#ifdef USE_WEBSOCKETS
struct websocket ws;
#endif
@@ -240,15 +238,11 @@ struct HTTP {
size_t push_headers_used; /* number of entries filled in */
size_t push_headers_alloc; /* number of entries allocated */
uint32_t error; /* HTTP/2 stream error code */
-#endif
-#if defined(USE_NGHTTP2) || defined(USE_NGHTTP3)
bool bodystarted;
int status_code; /* HTTP status code */
char *mem; /* points to a buffer in memory to store received data */
size_t len; /* size of the buffer 'mem' points to */
size_t memlen; /* size of data copied to mem */
-#endif
-#if defined(USE_NGHTTP2) || defined(ENABLE_QUIC)
/* fields used by both HTTP/2 and HTTP/3 */
const uint8_t *upload_mem; /* points to a buffer to read from */
size_t upload_len; /* size of the buffer 'upload_mem' points to */
@@ -256,49 +250,6 @@ struct HTTP {
bool closed; /* TRUE on stream close */
bool reset; /* TRUE on stream reset */
#endif
-
-#ifdef ENABLE_QUIC
-#ifndef USE_MSH3
- /*********** for HTTP/3 we store stream-local data here *************/
- int64_t stream3_id; /* stream we are interested in */
- uint64_t error3; /* HTTP/3 stream error code */
- bool firstheader; /* FALSE until headers arrive */
- bool firstbody; /* FALSE until body arrives */
- bool h3req; /* FALSE until request is issued */
-#endif /* !USE_MSH3 */
- bool upload_done;
-#endif /* ENABLE_QUIC */
-#ifdef USE_NGHTTP3
- size_t recv_buf_nonflow; /* buffered bytes, not counting for flow control */
- struct h3out *h3out; /* per-stream buffers for upload */
- struct dynbuf overflow; /* excess data received during a single Curl_read */
-#endif /* USE_NGHTTP3 */
-#ifdef USE_MSH3
- struct MSH3_REQUEST *req;
-#ifdef _WIN32
- CRITICAL_SECTION recv_lock;
-#else /* !_WIN32 */
- pthread_mutex_t recv_lock;
-#endif /* _WIN32 */
- /* Receive Buffer (Headers and Data) */
- uint8_t* recv_buf;
- size_t recv_buf_alloc;
- size_t recv_buf_max;
- /* Receive Headers */
- size_t recv_header_len;
- bool recv_header_complete;
- /* Receive Data */
- size_t recv_data_len;
- bool recv_data_complete;
- /* General Receive Error */
- CURLcode recv_error;
-#endif /* USE_MSH3 */
-#ifdef USE_QUICHE
- bool h3_got_header; /* TRUE when h3 stream has recvd some HEADER */
- bool h3_recving_data; /* TRUE when h3 stream is reading DATA */
- bool h3_body_pending; /* TRUE when h3 stream may have more body DATA */
- struct h3_event_node *pending;
-#endif /* USE_QUICHE */
};
CURLcode Curl_http_size(struct Curl_easy *data);