summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/urldata.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl/lib/urldata.h')
-rw-r--r--Utilities/cmcurl/lib/urldata.h59
1 files changed, 30 insertions, 29 deletions
diff --git a/Utilities/cmcurl/lib/urldata.h b/Utilities/cmcurl/lib/urldata.h
index cc9c888..9c34ec4 100644
--- a/Utilities/cmcurl/lib/urldata.h
+++ b/Utilities/cmcurl/lib/urldata.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -352,10 +352,6 @@ typedef enum {
GSS_AUTHSUCC
} curlnegotiate;
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
-#include <iconv.h>
-#endif
-
/* Struct used for GSSAPI (Kerberos V5) authentication */
#if defined(USE_KERBEROS5)
struct kerberos5data {
@@ -450,6 +446,11 @@ struct negotiatedata {
};
#endif
+#ifdef CURL_DISABLE_PROXY
+#define CONN_IS_PROXIED(x) 0
+#else
+#define CONN_IS_PROXIED(x) x->bits.proxy
+#endif
/*
* Boolean values that concerns this connection.
@@ -470,6 +471,7 @@ struct ConnectBits {
BIT(proxy_connect_closed); /* TRUE if a proxy disconnected the connection
in a CONNECT request with auth, so that
libcurl should reconnect and continue. */
+ BIT(proxy); /* if set, this transfer is done through a proxy - any type */
#endif
/* always modify bits.close with the connclose() and connkeep() macros! */
BIT(close); /* if set, we close the connection after this request */
@@ -479,8 +481,6 @@ struct ConnectBits {
that overrides the host in the URL */
BIT(conn_to_port); /* if set, this connection has a "connect to port"
that overrides the port in the URL (remote port) */
- BIT(proxy); /* if set, this transfer is done through a proxy - any type */
- BIT(user_passwd); /* do we use user+password for this connection? */
BIT(ipv6_ip); /* we communicate with a remote site specified with pure IPv6
IP address */
BIT(ipv6); /* we communicate with a site using an IPv6 address */
@@ -939,8 +939,9 @@ struct connectdata {
cache entry remains locked. It gets unlocked in multi_done() */
struct Curl_addrinfo *ip_addr;
struct Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */
-
+#ifdef ENABLE_IPV6
unsigned int scope_id; /* Scope id for IPv6 */
+#endif
enum {
TRNSPRT_TCP = 3,
@@ -982,7 +983,8 @@ struct connectdata {
char *user; /* user name string, allocated */
char *passwd; /* password string, allocated */
char *options; /* options string, allocated */
- char *sasl_authzid; /* authorisation identity string, allocated */
+ char *sasl_authzid; /* authorization identity string, allocated */
+ char *oauth_bearer; /* OAUTH2 bearer, allocated */
unsigned char httpversion; /* the HTTP version*10 reported by the server */
struct curltime now; /* "current" time */
struct curltime created; /* creation time */
@@ -1158,7 +1160,11 @@ struct PureInfo {
reused, in the connection cache. */
char conn_primary_ip[MAX_IPADR_LEN];
- int conn_primary_port;
+ int conn_primary_port; /* this is the destination port to the connection,
+ which might have been a proxy */
+ int conn_remote_port; /* this is the "remote port", which is the port
+ number of the used URL, independent of proxy or
+ not */
char conn_local_ip[MAX_IPADR_LEN];
int conn_local_port;
const char *conn_scheme;
@@ -1327,14 +1333,16 @@ struct UrlState {
char *ulbuf; /* allocated upload buffer or NULL */
curl_off_t current_speed; /* the ProgressShow() function sets this,
bytes / second */
- char *first_host; /* host name of the first (not followed) request.
- if set, this should be the host name that we will
- sent authorization to, no else. Used to make Location:
- following not keep sending user+password... This is
- strdup() data.
- */
+
+ /* host name, port number and protocol of the first (not followed) request.
+ if set, this should be the host name that we will sent authorization to,
+ no else. Used to make Location: following not keep sending user+password.
+ This is strdup()ed data. */
+ char *first_host;
+ int first_remote_port;
+ unsigned int first_remote_protocol;
+
int retrycount; /* number of retries on a new connection */
- int first_remote_port; /* remote port of the first (not followed) request */
struct Curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
long sessionage; /* number of the most recent session */
struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */
@@ -1342,6 +1350,7 @@ struct UrlState {
int os_errno; /* filled in with errno whenever an error occurs */
char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */
long followlocation; /* redirect counter */
+ int requests; /* request counter: redirects + authentication retakes */
#ifdef HAVE_SIGNAL
/* storage for the previous bag^H^H^HSIGPIPE signal handler :-) */
void (*prev_signal)(int sig);
@@ -1413,6 +1422,8 @@ struct UrlState {
size_t trailers_bytes_sent;
struct dynbuf trailers_buf; /* a buffer containing the compiled trailing
headers */
+ struct Curl_llist httphdrs; /* received headers */
+ struct curl_header headerout; /* for external purposes */
#endif
trailers_state trailers_state; /* whether we are sending trailers
and what stage are we at */
@@ -1659,13 +1670,6 @@ struct UserDefined {
void *prereq_userp; /* pre-initial request user data */
void *seek_client; /* pointer to pass to the seek callback */
- /* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
- /* function to convert from the network encoding: */
- curl_conv_callback convfromnetwork;
- /* function to convert to the network encoding: */
- curl_conv_callback convtonetwork;
- /* function to convert from UTF-8 encoding: */
- curl_conv_callback convfromutf8;
#ifndef CURL_DISABLE_HSTS
curl_hstsread_callback hsts_read;
void *hsts_read_userp;
@@ -1749,7 +1753,9 @@ struct UserDefined {
long ssh_auth_types; /* allowed SSH auth types */
char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
struct curl_blob *blobs[BLOB_LAST];
+#ifdef ENABLE_IPV6
unsigned int scope_id; /* Scope id for IPv6 */
+#endif
long allowed_protocols;
long redir_protocols;
long mime_options; /* Mime option flags. */
@@ -1949,11 +1955,6 @@ struct Curl_easy {
struct PureInfo info; /* stats, reports and info data */
struct curl_tlssessioninfo tsi; /* Information about the TLS session, only
valid after a client has asked for it */
-#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
- iconv_t outbound_cd; /* for translating to the network encoding */
- iconv_t inbound_cd; /* for translating from the network encoding */
- iconv_t utf8_cd; /* for translating to UTF8 */
-#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
#ifdef USE_HYPER
struct hyptransfer hyp;
#endif