summaryrefslogtreecommitdiff
path: root/lib/http.h
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2023-03-30 12:13:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-03-30 23:11:26 +0200
commit744dcf22fac6cf12a9112df106b61864982afef9 (patch)
tree7fa14c9fc43196508e9c08327184601496118c9b /lib/http.h
parent4ced75b7cee64cdf797eaa24a76d29324029ed15 (diff)
downloadcurl-744dcf22fac6cf12a9112df106b61864982afef9.tar.gz
http2: flow control and buffer improvements
- use bufq for send/receive of network data - usd bufq for send/receive of stream data - use HTTP/2 flow control with no-auto updates to control the amount of data we are buffering for a stream HTTP/2 stream window set to 128K after local tests, defined code constant for now - elminiating PAUSEing nghttp2 processing when receiving data since a stream can now take in all DATA nghttp2 forwards Improved scorecard and adjuste http2 stream window sizes - scorecard improved output formatting and options default - scorecard now also benchmarks small requests / second Closes #10771
Diffstat (limited to 'lib/http.h')
-rw-r--r--lib/http.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/http.h b/lib/http.h
index 5f4fcb904..b9a2e6149 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -29,6 +29,7 @@
#include <pthread.h>
#endif
+#include "bufq.h"
#include "dynhds.h"
#include "ws.h"
@@ -227,14 +228,12 @@ struct HTTP {
#ifdef USE_NGHTTP2
/*********** for HTTP/2 we store stream-local data here *************/
int32_t stream_id; /* stream we are interested in */
-
- /* We store non-final and final response headers here, per-stream */
- struct dynbuf header_recvbuf;
- size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into
- upper layer */
- struct dynbuf trailer_recvbuf;
- const uint8_t *pausedata; /* pointer to data received in on_data_chunk */
- size_t pauselen; /* the number of bytes left in data */
+ struct bufq h2_sendbuf; /* request body data buffere for sending */
+ size_t h2_send_hds_len; /* amount of bytes in first cf_send() that
+ are header bytes. Or 0 if not known. */
+ struct bufq h2_recvbuf;
+ size_t h2_recv_hds_len; /* how many bytes in recvbuf are headers */
+ struct dynhds resp_trailers;
bool close_handled; /* TRUE if stream closure is handled by libcurl */
char **push_headers; /* allocated array */
@@ -346,6 +345,7 @@ struct http_req {
char *authority;
char *path;
struct dynhds headers;
+ struct dynhds trailers;
};
/**
@@ -366,6 +366,7 @@ struct http_resp {
int status;
char *description;
struct dynhds headers;
+ struct dynhds trailers;
struct http_resp *prev;
};