mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
a CURLOPT_SRVTAG_GPG_HACK (passed through the the http engine). * http.h: Allow passing srvtag to http_open and http_open_document. * http.c (http_open, http_open_document): Allow passing srvtag to http_open and http_open_document.
This commit is contained in:
parent
a5b708ba9c
commit
a929f4c78e
7 changed files with 39 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-04-02 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform):
|
||||
Add a CURLOPT_SRVTAG_GPG_HACK (passed through the the http
|
||||
engine).
|
||||
|
||||
2009-04-01 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* gpgkeys_hkp.c (main): Switch default port for SSLized HKP to
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* curl-shim.c - Implement a small subset of the curl API in terms of
|
||||
* the iobuf HTTP API
|
||||
*
|
||||
* Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -134,6 +134,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;
|
||||
|
@ -182,7 +185,8 @@ curl_easy_perform(CURL *curl)
|
|||
|
||||
if(curl->flags.post)
|
||||
{
|
||||
rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,proxy);
|
||||
rc=http_open(&curl->hd,HTTP_REQ_POST,curl->url,curl->auth,0,proxy,
|
||||
curl->srvtag);
|
||||
if(rc==0)
|
||||
{
|
||||
char content_len[50];
|
||||
|
@ -203,7 +207,8 @@ curl_easy_perform(CURL *curl)
|
|||
}
|
||||
else
|
||||
{
|
||||
rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,proxy);
|
||||
rc=http_open(&curl->hd,HTTP_REQ_GET,curl->url,curl->auth,0,proxy,
|
||||
curl->srvtag);
|
||||
if(rc==0)
|
||||
{
|
||||
rc=http_wait_response(&curl->hd,&curl->status);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* curl-shim.h
|
||||
* Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GNUPG.
|
||||
*
|
||||
|
@ -48,7 +48,8 @@ typedef enum
|
|||
CURLOPT_CAINFO,
|
||||
CURLOPT_POST,
|
||||
CURLOPT_POSTFIELDS,
|
||||
CURLOPT_FAILONERROR
|
||||
CURLOPT_FAILONERROR,
|
||||
CURLOPT_SRVTAG_GPG_HACK
|
||||
} CURLoption;
|
||||
|
||||
typedef size_t (*write_func)(char *buffer,size_t size,
|
||||
|
@ -63,6 +64,7 @@ typedef struct
|
|||
write_func writer;
|
||||
void *file;
|
||||
char *postfields;
|
||||
char *srvtag;
|
||||
unsigned int status;
|
||||
FILE *errors;
|
||||
struct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue