search for: curl_easy_cleanup

Displaying 16 results from an estimated 16 matches for "curl_easy_cleanup".

2013 Aug 25
2
RCurl cookiejar
R-helpers, When I use cURL in the Terminal: curl --cookie-jar cookie.txt --url "http://corpusdelespanol.org/x.asp" --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20100101 Firefox/23.0" --location --include a cookie file "cookie.txt" is saved to my working directory. However, when I try what I think is the equivalent command R with RCurl:
2010 Nov 14
1
RCurl and cookies in POST requests
Hello. I know that it's usually possible to write cookies to a cookie file by removing the curl handle and doing a gc() call. I can do this with getURL(), but I just can't obtain the same results with postForm(). If I use: curlHandle <- getCurlHandle(cookiefile=FILE, cookiejar=FILE) and then do: getURL(http://example.com/script.cgi, curl=curlHandle) rm(curlHandle) gc() it's
2004 Aug 06
0
icecast2 ogg vorbis client request headers
...<1000;i++) { res = curl_easy_perform(curl); if (res != 0) { fprintf(stderr, "Curl failed: %d\n", res); } } /* always cleanup */ curl_easy_cleanup(curl); } return 0; } /*****************************************************************************/ /*****************************************************************************/ #include <stdio.h> int main() { int i = 0; for (i=0;i<1000;i++) {...
2004 Aug 06
3
icecast2 ogg vorbis client request headers
On Monday 05 April 2004 13:04, oddsock wrote: > At 07:41 PM 4/4/2004, you wrote: > >That was your plan. > > > >My plan is to provide what currently exists (htpasswd-like) and a 'script' > >authenticator which just calls an external program, as Geoff described. > > > >Both are, of course, possible. Your "URL call" (this is a very strange way
2012 Oct 10
0
[LLVMdev] Solicit code review (change to CodeGen)
LGTM. I will commit. On Oct 10, 2012, at 1:20 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > Hi, > > The attached is the fix to radar://11663049. The optimization can be outlined by following rules: > > (select (x != c), e, c) -> select (x != c), e, x), > (select (x == c), c, e) -> select (x == c), x, e) > where the <c> is an integer
2024 Apr 25
1
Big speedup in install.packages() by re-using connections
I'd like to raise this again now that 4.4 is out. Below is a more complete patch which includes a function to properly cleanup libcurl when R quits. Implementing this is a little tricky because libcurl is a separate "module" in R, perhaps there is a better way, but this works: view: https://github.com/r-devel/r-svn/pull/166/files patch:
2012 Oct 10
2
[LLVMdev] Solicit code review (change to CodeGen)
Hi, The attached is the fix to radar://11663049. The optimization can be outlined by following rules: (select (x != c), e, c) -> select (x != c), e, x), (select (x == c), c, e) -> select (x == c), x, e) where the <c> is an integer constant. The reason for this change is that : on x86, conditional-move-from-constant needs two instructions; however,
2009 Jul 23
1
viewer updates for fedora submission
This patchset provides updates to the viewer in preperation for its fedora submission. Included are patches cmd-line parameterizing hostname/user/pass/vm, the addition of a man page, cleanup of the project's structure, and updates to the spec.
2009 Jul 13
0
[PATCH viewer] permit hostname / username / password / vm to be passed in via the cmd line
...char curl_error_buffer[CURL_ERROR_SIZE]; static char *uri = NULL; -static char *username = NULL; -static char *password = NULL; static gboolean process_message (struct message *); @@ -396,8 +394,6 @@ process_message (struct message *msg) write_fn_discard_capture_buffer (); if (curl) curl_easy_cleanup (curl); if (uri) g_free (uri); - if (username) g_free (username); - if (password) g_free (password); set_connected (FALSE); set_logged_in (FALSE); return 1; @@ -424,20 +420,11 @@ process_message (struct message *msg) curl = NULL; if (uri) g_free (uri); uri =...
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...00006e58 T _fini 0000000000003188 T _init 0000000000005c30 T addFormElement 0000000000006050 T buildForm 0000000000003870 t call_gmon_start U calloc@@GLIBC_2.2.5 0000000000004f90 T checkEncoding 000000000020aee0 b completed.6183 0000000000006a30 T createNamedEnum U curl_easy_cleanup@@CURL_GNUTLS_3 U curl_easy_duphandle@@CURL_GNUTLS_3 U curl_easy_getinfo@@CURL_GNUTLS_3 U curl_easy_init@@CURL_GNUTLS_3 U curl_easy_perform@@CURL_GNUTLS_3 U curl_easy_setopt@@CURL_GNUTLS_3 U curl_ea...
2008 May 07
1
[BioC] RCurl loading problem with 64 bit linux distribution
...00006e58 T _fini 0000000000003188 T _init 0000000000005c30 T addFormElement 0000000000006050 T buildForm 0000000000003870 t call_gmon_start U calloc@@GLIBC_2.2.5 0000000000004f90 T checkEncoding 000000000020aee0 b completed.6183 0000000000006a30 T createNamedEnum U curl_easy_cleanup@@CURL_GNUTLS_3 U curl_easy_duphandle@@CURL_GNUTLS_3 U curl_easy_getinfo@@CURL_GNUTLS_3 U curl_easy_init@@CURL_GNUTLS_3 U curl_easy_perform@@CURL_GNUTLS_3 U curl_easy_setopt@@CURL_GNUTLS_3 U curl_ea...
2020 Jul 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...o_auth_script (h) == -1) + goto err; h->accept_range = false; curl_easy_setopt (h->c, CURLOPT_NOBODY, 1); /* No Body, not nobody! */ curl_easy_setopt (h->c, CURLOPT_HEADERFUNCTION, header_cb); @@ -608,6 +619,8 @@ curl_close (void *handle) struct curl_handle *h = handle; curl_easy_cleanup (h->c); + if (h->auth_headers) + curl_slist_free_all (h->auth_headers); free (h); } @@ -638,6 +651,10 @@ curl_pread (void *handle, void *buf, uint32_t count, uint64_t offset) CURLcode r; char range[128]; + /* Run the auth-script if necessary and set headers in the handle...
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.
...+ if (do_scripts (h) == -1) goto err; h->accept_range = false; curl_easy_setopt (h->c, CURLOPT_NOBODY, 1); /* No Body, not nobody! */ curl_easy_setopt (h->c, CURLOPT_HEADERFUNCTION, header_cb); @@ -608,6 +652,8 @@ curl_close (void *handle) struct curl_handle *h = handle; curl_easy_cleanup (h->c); + if (h->headers_copy) + curl_slist_free_all (h->headers_copy); free (h); } @@ -638,6 +684,9 @@ curl_pread (void *handle, void *buf, uint32_t count, uint64_t offset) CURLcode r; char range[128]; + /* Run the scripts if necessary and set headers in the handle. */...
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...n; static size_t rcvData(void *ptr, size_t size, size_t nitems, void *ctx) @@ -771,6 +790,7 @@ static void Curl_close(Rconnection con) { RCurlconn ctxt = (RCurlconn)(con->private); + curl_slist_free_all(ctxt->headers); curl_multi_remove_handle(ctxt->mh, ctxt->hnd); curl_easy_cleanup(ctxt->hnd); curl_multi_cleanup(ctxt->mh); @@ -830,6 +850,9 @@ static Rboolean Curl_open(Rconnection con) curl_easy_setopt(ctxt->hnd, CURLOPT_TCP_KEEPALIVE, 1L); #endif + if (ctxt->headers) { + curl_easy_setopt(ctxt->hnd, CURLOPT_HTTPHEADER, ctxt->headers); + }...
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.