- Tidy the package
- Make this a namespace and register the routines.
- Fill in the conversions for the opts.
- Do the coercion to the right type.
Handle protected and not protected cases.
We can tell what the target data type is from
the number encoded in the option id.
These jump into different ranges for the different types.
So we can test for type, or coerce, in R.
Unfortunately, only up to OBJECTPOINT
- Check releasing the form HTTPPOST list.
- Should be ok.
Make certain we release the memory for the slist elements.
For HTTPPOST, this is protected because we don't leave
it in the CURL because we reset the HTTPPOST field.
- setCurlHeaders via regular options
- Check releasing the form HTTPHEADER list.
- Bits for initializing the global state.
- CIRL_GLOBAL_SSL, CIRL_GLOBAL_WIN32, NOTHING, ALL
Check if R initializes this on Windows and accordingly turn it
off here.
- Get the names of the curl error codes to put on the status.
- Already there. See asCurlErrorCode
- Memory management!!!
-
Release the curl object if possible by knowing whether
this is a local use of the data or whether it will persist.
For persistence, we will have to collect
data structures and know how to release them.
We can collect them as linked lists
and associate them with the CURL handle via a table
or simple linked list.
There doesn't seem to be a hook to tag something into the
CURL handle.
- Callback for the password for an HTTPS connection.
- Doesn't appear to be used in libcurl anymore.
Do we use the ssl context callback?
PASSWDFUNCTION is deprecated.
So it appears that the caller has to set it in the USERPWD.
- Can read header separately with a headerfunction option in the
same
way as writefunction.
-
- curl_easy_getinfo()
- Done
- Passwords. Find out why they aren't behaving - in https.
-
getURL("https://secureweb.ucdavis.edu:443")
getURL("https://my.ucdavis.edu")
netrc file.
Without https, they are working,
either via CURLOPT_USERPWD
or the .netrc file.
- Keep alives for connection.
- Should be done by default in libcurl?
If not, just add it to the httpheader option.
- Check the error handling from curl.
- R_CURL_CHECK_ERROR.
- Allow access to setting header information.
-
Done via the options now. httpheaders
This combines the names and values if
there are names and all the entries don't have
a : in them.
See setCurlHeaders().
Note that we can include this directly in the
converter for an R object to a CURL option.
We just need to tidy up after this.
curl_slist_append().
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
- HTTPS
- "https://sourceforge.net/" works.
- Version information
- Handle the features bitfield
Automate this (unfortunately #defines)
- Redirects and relocations for URIs.
- Set the FOLLOWLOCATION by default.
- Finalizer on the curls.
-
- Make the curl perform function take options.
- Done.
- Make the converters know whether the objects are protected are not.
-
- Form handling
-
Test on winnie:cgi-bin/form1.pl
and
postForm("http://www.speakeasy.org/~cgires/perl_form.cgi",
"some_text" = "Duncan",
"choice" = "Ho",
"radbut" = "eep",
# "box" = "box1"
"box" = "box1, box2"
# and try c("box1", "box2")
)