summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-15 11:28:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-15 11:34:56 +0200
commitaee277bc54507d32318f2783a9256aff84a92cec (patch)
tree58d9a981811efc730b9768d87419df738cb21f10 /lib/urldata.h
parent350a99b21f8c89db2d027d9a5c83ed5df72d65ea (diff)
downloadcurl-bagder/http-data-to-curl-easy.tar.gz
http: move request-specific header store to urldate from connectdatabagder/http-data-to-curl-easy
Since the connection can be used by many independent requests (using HTTP/2 or HTTP/3), things like user-agent and other transfer-specific data MUST NOT be kept connection oriented as it could lead to requests getting the wrong string for their requests. This struct data was lingering like this due to old HTTP1 legacy thinking where it didn't mattered.. Fixes #5566
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 1882914e0..33ec160ac 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1003,21 +1003,6 @@ struct connectdata {
well be the same we read from.
CURL_SOCKET_BAD disables */
- /** Dynamically allocated strings, MUST be freed before this **/
- /** struct is killed. **/
- struct dynamically_allocated_data {
- char *proxyuserpwd;
- char *uagent;
- char *accept_encoding;
- char *userpwd;
- char *rangeline;
- char *ref;
- char *host;
- char *cookiehost;
- char *rtsp_transport;
- char *te; /* TE: request header */
- } allocptr;
-
#ifdef HAVE_GSSAPI
BIT(sec_complete); /* if Kerberos is enabled for this connection */
enum protection_level command_prot;
@@ -1396,6 +1381,22 @@ struct UrlState {
#endif
trailers_state trailers_state; /* whether we are sending trailers
and what stage are we at */
+
+ /* Dynamically allocated strings, MUST be freed before this struct is
+ killed. */
+ struct dynamically_allocated_data {
+ char *proxyuserpwd;
+ char *uagent;
+ char *accept_encoding;
+ char *userpwd;
+ char *rangeline;
+ char *ref;
+ char *host;
+ char *cookiehost;
+ char *rtsp_transport;
+ char *te; /* TE: request header */
+ } aptr;
+
#ifdef CURLDEBUG
BIT(conncache_lock);
#endif