Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl's verbose=TRUE argument not working on Windows #230

Open
allanvc opened this issue Jul 26, 2020 · 0 comments
Open

curl's verbose=TRUE argument not working on Windows #230

allanvc opened this issue Jul 26, 2020 · 0 comments

Comments

@allanvc
Copy link

@allanvc allanvc commented Jul 26, 2020

Hi Jeroen. Thanks for this nice and useful package.
I currently have a package built on top of curl. It is called mRpostman. The idea is to implement several IMAP functionalities so that R users can easily manipulate mail folders and messages from inside R.
A few weeks ago, I noticed that the curl's verbose=TRUE argument is not working properly on Windows. Sometimes the communication with the server appears in the console, sometimes it doesn’t .

I test it regularly on Linux and everything works fine. So, the problem seems to be restricted to Windows.

The code below may allow you to replicate the problem:

conn_params <- list(username="user@gmail.com",
                    password="pass",
                    verbose = TRUE)

h <- curl::new_handle()

do.call(curl::handle_setopt, c(h, conn_params))

curl::handle_setopt(h, customrequest = paste0('SELECT ', "INBOX"))

curl::curl_fetch_memory("imaps://imap.gmail.com", handle = h)

In mRpostman, the equivalent would be:

library(mRpostman)
imapconf <- configure_imap(url="imaps://imap.gmail.com",
                           username="user",
                           password="pass",
                           verbose = TRUE
)

imapconf %>%
  select_mailbox(mbox = "INBOX")

This is my libcurl version on Windows:

curl::curl_version()
$version
[1] "7.64.1"

$ssl_version
[1] "(OpenSSL/1.1.1a) Schannel"

$libz_version
[1] "1.2.11"

$libssh_version
[1] "libssh2/1.8.2"

$libidn_version
[1] NA

$host
[1] "x86_64-w64-mingw32"

$protocols
 [1] "dict"   "file"   "ftp"    "ftps"   "gopher" "http"   "https"  "imap"   "imaps"  "ldap"   "ldaps" 
[12] "pop3"   "pop3s"  "rtsp"   "scp"    "sftp"   "smtp"   "smtps"  "telnet" "tftp"  

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252  LC_CTYPE=Portuguese_Brazil.1252    LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C                       LC_TIME=Portuguese_Brazil.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] mRpostman_0.3.1

loaded via a namespace (and not attached):
[1] compiler_4.0.2   assertthat_0.2.1 magrittr_1.5     tools_4.0.2      rstudioapi_0.11  curl_4.3        
[7] stringi_1.4.6    stringr_1.4.0 
@allanvc allanvc changed the title curl verbose option not working on Windows curl's verbose option not working on Windows Sep 15, 2020
@allanvc allanvc changed the title curl's verbose option not working on Windows curl's verbose=TRUE argument not working on Windows Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.