aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-05-22 22:40:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-05-22 22:40:01 +0000
commit8026b1e194d779609374019ff943f05bf4c77d79 (patch)
tree15b7e9c1d9b652b8d34bb687d2c5ba9ff7c8f39c /src
parenta39d77227fe9d74db74fee259329e4b4a086fcce (diff)
Introducing --digest
Diffstat (limited to 'src')
-rw-r--r--src/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 7a56882e6..85f3b3163 100644
--- a/src/main.c
+++ b/src/main.c
@@ -345,7 +345,8 @@ static void help(void)
" -C/--continue-at <offset> Specify absolute resume offset\n"
" -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)");
+ " --data-binary <data> HTTP POST binary data (H)\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"
" -D/--dump-header <file> Write the headers to this file\n"
@@ -446,6 +447,7 @@ struct Configurable {
char *cookiefile; /* read from this file */
bool cookiesession; /* new session? */
bool encoding; /* Accept-Encoding please */
+ bool digest; /* Digest Authentication */
bool use_resume;
bool resume_from_current;
bool disable_epsv;
@@ -1037,6 +1039,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
{"5h", "trace-ascii", TRUE},
{"5i", "limit-rate", TRUE},
{"5j", "compressed", FALSE}, /* might take an arg someday */
+ {"5k", "digest", FALSE},
{"0", "http1.0", FALSE},
{"1", "tlsv1", FALSE},
{"2", "sslv2", FALSE},
@@ -1261,6 +1264,10 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
config->encoding ^= TRUE;
break;
+ case 'k': /* --digest */
+ config->digest ^= TRUE;
+ break;
+
default: /* the URL! */
{
struct getout *url;
@@ -2947,6 +2954,9 @@ operate(struct Configurable *config, int argc, char *argv[])
if(config->disable_eprt)
/* 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);
/* new in curl 7.9.7 */
if(config->trace_dump) {