search for: utilsn

Displaying 1 result from an estimated 1 matches for "utilsn".

Did you mean: utils
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...Rboolean url_open(Rconnection con) #endif case HTTPsh: { - SEXP sheaders, agentFun; - const char *headers; + SEXP sagent, agentFun; + const char *agent; SEXP s_makeUserAgent = install("makeUserAgent"); agentFun = PROTECT(lang1(s_makeUserAgent)); // defaults to ,TRUE SEXP utilsNS = PROTECT(R_FindNamespace(mkString("utils"))); - sheaders = eval(agentFun, utilsNS); + struct urlconn *uc = con->private; + sagent = eval(agentFun, utilsNS); UNPROTECT(1); /* utilsNS */ - PROTECT(sheaders); - if(TYPEOF(sheaders) == NILSXP) - headers = NULL; + PROTECT(sagent); + i...