-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add new default 'libcurl' transport #348
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified 👍
Looks great! One note: I see you are manually parsing cookies from the header, are you aware libcurl has a native function for this called |
Yes, I saw that! Very useful. However we have our own internal cookie implementation that we use on all the other transports, and re-using it was more straightforward than adding additional state management to keep curl handles around. |
You could also consider dropping |
This change adds a new HTTP transport, "libcurl", and makes it the default. This new transport uses the curl package, which is significantly more modern and better maintained than RCurl. Consequently we're also able to restore a unified HTTP transport default across all operating systems (we formerly had to use the command-line "curl" transport on Windows due to issues with the aging RCurl).
The diff is noisier than it needs to be since it includes some file splitting;
http.R
had grown to over 1200 lines. Each transport now has its own file.The other source of noise is a complete re-write of how we handle streaming logs from shinyapps.io, necessitated because curl and RCurl handle streaming differently. Thankfully the new implementation is much more succinct and doesn't require a child R process.
Closes #325.