Displaying 9 results from an estimated 9 matches for "curlproto_all".
2020 Jan 08
1
[nbdkit PATCH] curl: use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T when available
...double (the old information).
---
plugins/curl/curl.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index 1b0d2b9..e0449b7 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -70,6 +70,10 @@ static long protocols = CURLPROTO_ALL;
/* Use '-D curl.verbose=1' to set. */
int curl_debug_verbose = 0;
+#if CURL_AT_LEAST_VERSION(7, 55, 0)
+#define HAVE_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
+#endif
+
static void
curl_load (void)
{
@@ -290,6 +294,9 @@ curl_open (int readonly)
struct curl_handle *h;
CURLcode r;
d...
2020 Jul 20
1
Re: [PATCH nbdkit v2] curl: Implement header and cookie scripts.
...ration. */
> +const char *url = NULL; /* required */
>
> -static const char *cainfo = NULL;
> -static const char *capath = NULL;
> -static char *cookie = NULL;
> -static struct curl_slist *headers = NULL;
> -static char *password = NULL;
> -static long protocols = CURLPROTO_ALL;
> -static const char *proxy = NULL;
> -static char *proxy_password = NULL;
> -static const char *proxy_user = NULL;
> -static bool sslverify = true;
> -static bool tcp_keepalive = false;
> -static bool tcp_nodelay = true;
> -static uint32_t timeout = 0;
> -static const char...
2020 Jan 17
1
[PATCH nbdkit] Add cainfo and capath options to curl plugin
...insertions(+)
diff --git a/plugins/curl/curl.c b/plugins/curl/curl.c
index 007449b..1381832 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -66,6 +66,8 @@ static bool sslverify = true;
static uint32_t timeout = 0;
static const char *unix_socket_path = NULL;
static long protocols = CURLPROTO_ALL;
+static const char *cainfo = NULL;
+static const char *capath = NULL;
/* Use '-D curl.verbose=1' to set. */
int curl_debug_verbose = 0;
@@ -231,6 +233,14 @@ curl_config (const char *key, const char *value)
return -1;
}
+ else if (strcmp (key, "cainfo") == 0) {
+...
2020 Jul 15
2
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
Evolution of this patch series:
https://www.redhat.com/archives/libguestfs/2020-July/thread.html#00073
Instead of auth-script, this implements header-script and
cookie-script. It can be used for similar purposes but the
implementation is somewhat saner.
Rich.
2020 Jul 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...NULL; /* required */
+/* Plugin configuration. */
+const char *url = NULL; /* required */
-static const char *cainfo = NULL;
-static const char *capath = NULL;
-static char *cookie = NULL;
-static struct curl_slist *headers = NULL;
-static char *password = NULL;
-static long protocols = CURLPROTO_ALL;
-static const char *proxy = NULL;
-static char *proxy_password = NULL;
-static const char *proxy_user = NULL;
-static bool sslverify = true;
-static bool tcp_keepalive = false;
-static bool tcp_nodelay = true;
-static uint32_t timeout = 0;
-static const char *unix_socket_path = NULL;
-static const...
2020 Jul 14
3
[PATCH nbdkit RFC 0/2] curl: Implement authorization scripts.
This is an RFC only, at the very least it lacks tests.
This implements a rather complex new feature in nbdkit-curl-plugin
allowing you to specify an external shell script that can be used to
fetch an authorization token for services which requires a token or
cookie for access, especially if that token must be renewed
periodically. The motivation can be seen in the changes to the docs
in patch 2.
2020 Jul 15
0
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
...NULL; /* required */
+/* Plugin configuration. */
+const char *url = NULL; /* required */
-static const char *cainfo = NULL;
-static const char *capath = NULL;
-static char *cookie = NULL;
-static struct curl_slist *headers = NULL;
-static char *password = NULL;
-static long protocols = CURLPROTO_ALL;
-static const char *proxy = NULL;
-static char *proxy_password = NULL;
-static const char *proxy_user = NULL;
-static bool sslverify = true;
-static bool tcp_keepalive = false;
-static bool tcp_nodelay = true;
-static uint32_t timeout = 0;
-static const char *unix_socket_path = NULL;
-static const...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
.../plugins/curl/curl.c
@@ -62,7 +62,7 @@ static const char *proxy_user = NULL;
static char *proxy_password = NULL;
static char *cookie = NULL;
static bool sslverify = true;
-static long timeout = 0;
+static uint32_t timeout = 0;
static const char *unix_socket_path = NULL;
static long protocols = CURLPROTO_ALL;
@@ -204,7 +204,9 @@ curl_config (const char *key, const char *value)
}
else if (strcmp (key, "timeout") == 0) {
- if (sscanf (value, "%ld", &timeout) != 1 || timeout < 0) {
+ if (nbdkit_parse_uint32_t ("timeout", value, &timeout) == -1)
+...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote:
> > + int nbdkit_parse_long (const char *what, const char *str, long *r);
> > + int nbdkit_parse_unsigned_long (const char *what,
> > + const char *str, unsigned long *r);
>
> Do we really want to encourage the use of parse_long and
> parse_unsigned_long? Those differ between