Displaying 6 results from an estimated 6 matches for "curlopt_httphead".
Did you mean:
curlopt_httpheader
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 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...ime, or because auth_script_renew has
+ * elapsed since last time), then it runs it, blocking all threads
+ * while that happens. (2) Whether or not we ran auth_script, this
+ * must set up the headers and/or cookies in the CURL handle.
+ *
+ * Number (2) is complicated. We cannot simply call
+ * CURLOPT_HTTPHEADER and CURLOPT_COOKIE a second time because
+ * curl doesn't work like that. Instead we have to generate
+ * a new list of headers and new cookie string and set those.
+ *
+ * We have to set these every time because the auth-script might have
+ * been re-run in another thread, and also the auth...
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 15
0
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
...th C<header>, and C<cookie-script>
+is incompatible with C<cookie>.
+
+=head2 Header script
+
+The header script should print zero or more HTTP headers, each line of
+output in the same format as the C<header> parameter. The headers
+printed by the script are passed to L<CURLOPT_HTTPHEADER(3)>.
+
+In the following example, an imaginary web service requires
+authentication using a token fetched from a separate login server.
+The token expires after 60 seconds, so we also tell the plugin that it
+must renew the token (by re-running the script) if more than 45
+seconds have elapsed...
2020 Jul 20
1
Re: [PATCH nbdkit v2] curl: Implement header and cookie scripts.
...-script>
> +is incompatible with C<cookie>.
> +
> +=head2 Header script
> +
> +The header script should print zero or more HTTP headers, each line of
> +output in the same format as the C<header> parameter. The headers
> +printed by the script are passed to L<CURLOPT_HTTPHEADER(3)>.
> +
> +In the following example, an imaginary web service requires
> +authentication using a token fetched from a separate login server.
> +The token expires after 60 seconds, so we also tell the plugin that it
> +must renew the token (by re-running the script) if more than...
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...t;));
+ }
+ headers = tmp;
}
CURLM *mhnd = curl_multi_init();
@@ -521,8 +540,7 @@ in_do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho)
#if (LIBCURL_VERSION_MINOR >= 25)
curl_easy_setopt(hnd[i], CURLOPT_TCP_KEEPALIVE, 1L);
#endif
- if (!cacheOK)
- curl_easy_setopt(hnd[i], CURLOPT_HTTPHEADER, slist1);
+ curl_easy_setopt(hnd[i], CURLOPT_HTTPHEADER, headers);
/* check that destfile can be written */
file = translateChar(STRING_ELT(sfile, i));
@@ -660,7 +678,7 @@ in_do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho)
if(nurls == 1)
curl_easy_getinfo(hnd[0], CURLINFO_RES...