From a7205a080cf1b17d385453c8ec244d3bf67bf537 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 28 May 2009 04:25:25 +0000 Subject: * 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). --- keyserver/curl-shim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'keyserver/curl-shim.c') diff --git a/keyserver/curl-shim.c b/keyserver/curl-shim.c index 0c8bfdc9b..98b5b24c7 100644 --- a/keyserver/curl-shim.c +++ b/keyserver/curl-shim.c @@ -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); -- cgit v1.2.3