Displaying 2 results from an estimated 2 matches for "script_cookies".
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.
...+/* Last time auth-script was run. */
+static time_t last = 0;
+static bool auth_script_has_run = false;
+
+/* List of extra headers and cookies from the output of auth-script. */
+DEFINE_VECTOR_TYPE(string_vector, char *);
+static string_vector script_headers = empty_vector;
+static string_vector script_cookies = empty_vector;
+
+/* Called from plugin curl_unload(). */
+void
+auth_script_unload (void)
+{
+ string_vector_iter (&script_headers, (void *) free);
+ string_vector_iter (&script_cookies, (void *) free);
+ free (script_headers.ptr);
+ free (script_cookies.ptr);
+}
+
+static int run_aut...