1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* http.h, http.c (send_request): Pass in srvtag and make its presence

sufficient to turn the feature on.  (http_open): From here.
(http_document): And here.

* gpgkeys_hkp.c (srv_replace): New function to transform a SRV
hostname to a real hostname.  (main): Call it from here for the
HAVE_LIBCURL case (without libcurl is handled via the curl-shim).

* curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
a CURLOPT_SRVTAG_GPG_HACK (passed through the the http engine).
This commit is contained in:
David Shaw 2009-05-28 04:25:25 +00:00
parent fb866ea151
commit a7205a080c
7 changed files with 125 additions and 35 deletions

View file

@ -144,6 +144,9 @@ curl_easy_setopt(CURL *curl,CURLoption option,...)
case CURLOPT_POSTFIELDS:
curl->postfields=va_arg(ap,char *);
break;
case CURLOPT_SRVTAG_GPG_HACK:
curl->srvtag=va_arg(ap,char *);
break;
case CURLOPT_FAILONERROR:
curl->flags.failonerror=va_arg(ap,long)?1:0;
break;
@ -193,7 +196,7 @@ curl_easy_perform(CURL *curl)
if(curl->flags.post)
{
rc = http_open (&curl->hd, HTTP_REQ_POST, curl->url, curl->auth,
0, proxy, NULL);
0, proxy, NULL, curl->srvtag);
if (!rc)
{
unsigned int post_len = strlen(curl->postfields);
@ -216,7 +219,7 @@ curl_easy_perform(CURL *curl)
else
{
rc = http_open (&curl->hd, HTTP_REQ_GET, curl->url, curl->auth,
0, proxy, NULL);
0, proxy, NULL, curl->srvtag);
if (!rc)
{
rc = http_wait_response (curl->hd);