aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-04 07:52:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-04 07:52:53 +0000
commitfc6eff13b5414caf6edf22d73a3239e074a04216 (patch)
treeeada47ce6b65dee31800734c70220bf22c8deec3 /lib/urldata.h
parente7ee1ccf4596a37a2278e523d0da7652ab43a42c (diff)
General HTTP authentication cleanup and fixes
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 9cda637b9..8d29cf66e 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -678,6 +678,16 @@ typedef enum {
#define MAX_CURL_USER_LENGTH_TXT "255"
#define MAX_CURL_PASSWORD_LENGTH_TXT "255"
+struct auth {
+ long want; /* Bitmask set to the authentication methods wanted by the app
+ (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
+ long picked;
+ long avail; /* bitmask for what the server reports to support for this
+ resource */
+ bool done; /* TRUE when the auth phase is done and ready to do the *actual*
+ request */
+};
+
struct UrlState {
enum {
Curl_if_none,
@@ -724,22 +734,16 @@ struct UrlState {
is always set TRUE when curl_easy_perform() is called. */
struct digestdata digest;
+ struct digestdata proxydigest;
#ifdef HAVE_GSSAPI
struct negotiatedata negotiate;
#endif
- long authstage; /* 0 - authwant and authavail are still not initialized
- 401 - web authentication is performed
- 407 - proxy authentication is performed */
- long authwant; /* initially set to authentication methods requested by
- client (either with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH
- depending on authstage) */
- long authavail; /* what the server reports */
+ struct auth authhost;
+ struct auth authproxy;
bool authproblem; /* TRUE if there's some problem authenticating */
- bool authdone; /* TRUE when the auth phase is done and ready
- to do the *actual* request */
#ifdef USE_ARES
ares_channel areschannel; /* for name resolves */
#endif