devtools icon indicating copy to clipboard operation
devtools copied to clipboard

feat: check_win: add `webform` argument as alternative to FTP upload

Open brownag opened this issue 3 months ago • 0 comments

The existing check_win_*() functions use passive FTP to upload package tarballs to WinBuilder. FTP is increasingly deprecated or blocked in modern network environments due to security policies, firewall restrictions, or lack of support.

WinBuilder also provides a webform-based submission interface (upload.aspx) that accepts HTTP POST requests.

In this PR a new argument webform = FALSE is added to all check_win_*() functions. When webform = TRUE, the package is submitted via HTTP POST to the ASP.NET form.

The implementation performs a GET request to retrieve the form and extract required hidden fields: __VIEWSTATE, __VIEWSTATEGENERATOR, __EVENTVALIDATION. Then, it constructs a multipart/form-data POST request to upload the package. The correct field names are selected based on the R version (R-release, R-devel, or R-oldrelease).

I needed this functionality because check_win_devel() and friends time out when attempting FTP submission on my work network, and I prefer the convenience of an R command to submit rather than manually entering into web form or using FTP. It seems to work well for my purposes.

I would be happy to revise this PR further if there is interest in incorporating this feature into official devtools.

Happy to change it up if there are better ways to implement, just wanted to identify the issue and provide the proof-of-concept.

Also, if needed I can add tests, but since the FTP-based functionality is not currently tested / mocked I did not implement that for this alternative option.

Thank you in advance for your consideration

brownag avatar Sep 16 '25 00:09 brownag