diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-06-10 12:49:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-06-10 12:49:16 +0000 |
commit | d0cc92a01a5b373c6730acd84009294da9c29e44 (patch) | |
tree | 676b0194dbf4c3c8221f71eb06b905f89a65a0b8 /src | |
parent | d7980c1a45dfca05eac5800e0f4c4740244c86f3 (diff) |
Set auth type differently, we use one CURLOPT_HTTPAUTH instead as we plan
to add more method in the future.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/main.c b/src/main.c index 0e740f3ed..ef5217280 100644 --- a/src/main.c +++ b/src/main.c @@ -359,9 +359,7 @@ static void help(void) " -d/--data <data> HTTP POST data (H)\n" " --data-ascii <data> HTTP POST ASCII data (H)\n" " --data-binary <data> HTTP POST binary data (H)\n" -#ifdef GSSAPI - " --negotiate Enable HTTP Negotiate Authentication\n" -#endif + " --negotiate Enable HTTP Negotiate Authentication (req GSS-lib)\n" " --digest Enable HTTP Digest Authentication"); puts(" --disable-eprt Prevents curl from using EPRT or LPRT (F)\n" " --disable-epsv Prevents curl from using EPSV (F)\n" @@ -464,9 +462,7 @@ struct Configurable { bool cookiesession; /* new session? */ bool encoding; /* Accept-Encoding please */ bool digest; /* Digest Authentication */ -#ifdef GSSAPI bool negotiate; /* Negotiate Authentication */ -#endif bool use_resume; bool resume_from_current; bool disable_epsv; @@ -1059,9 +1055,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"5i", "limit-rate", TRUE}, {"5j", "compressed", FALSE}, /* might take an arg someday */ {"5k", "digest", FALSE}, -#ifdef GSSAPI {"5l", "negotiate", FALSE}, -#endif {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, @@ -1290,11 +1284,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ config->digest ^= TRUE; break; -#ifdef GSSAPI case 'l': /* --negotiate */ config->negotiate ^= TRUE; break; -#endif default: /* the URL! */ { @@ -2989,12 +2981,11 @@ operate(struct Configurable *config, int argc, char *argv[]) /* disable it */ curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, FALSE); - /* new in libcurl 7.10.6 */ - curl_easy_setopt(curl, CURLOPT_HTTPDIGEST, config->digest); - -#ifdef GSSAPI - curl_easy_setopt(curl, CURLOPT_HTTPNEGOTIATE, config->negotiate); -#endif + /* new in libcurl 7.10.6 (default is Basic) */ + if(config->digest) + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLHTTP_DIGEST); + else if(config->negotiate) + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLHTTP_NEGOTIATE); /* new in curl 7.9.7 */ if(config->trace_dump) { |