diff options
author | David Shaw <[email protected]> | 2005-06-23 04:44:20 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-06-23 04:44:20 +0000 |
commit | d65763eccdce79eccd61d9dd36273cadffa1e22d (patch) | |
tree | 53f610b0517232e4667279876df67a58697dfbd6 /keyserver/curl-shim.c | |
parent | * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key, (diff) | |
download | gnupg-d65763eccdce79eccd61d9dd36273cadffa1e22d.tar.gz gnupg-d65763eccdce79eccd61d9dd36273cadffa1e22d.zip |
* curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
CURLOPT_USERPWD option for HTTP auth.
Diffstat (limited to 'keyserver/curl-shim.c')
-rw-r--r-- | keyserver/curl-shim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/keyserver/curl-shim.c b/keyserver/curl-shim.c index 33619df51..4828f5253 100644 --- a/keyserver/curl-shim.c +++ b/keyserver/curl-shim.c @@ -104,6 +104,9 @@ curl_easy_setopt(CURL *curl,CURLoption option,...) case CURLOPT_URL: curl->url=va_arg(ap,char *); break; + case CURLOPT_USERPWD: + curl->auth=va_arg(ap,char *); + break; case CURLOPT_WRITEFUNCTION: curl->writer=va_arg(ap,write_func); break; @@ -142,7 +145,7 @@ curl_easy_perform(CURL *curl) if(curl->flags.post) { - rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,curl->proxy); if(rc==0) { char content_len[50]; @@ -163,7 +166,7 @@ curl_easy_perform(CURL *curl) } else { - rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,0,curl->proxy); + rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,curl->proxy); if(rc==0) { rc=http_wait_response(&curl->hd,&curl->status); |