Skip to content

feat: check_win: add webform argument as alternative to FTP upload#2619

Merged
jennybc merged 10 commits intor-lib:mainfrom
brownag:check-win-webform1
Mar 3, 2026
Merged

feat: check_win: add webform argument as alternative to FTP upload#2619
jennybc merged 10 commits intor-lib:mainfrom
brownag:check-win-webform1

Conversation

@brownag
Copy link
Contributor

@brownag brownag commented Sep 16, 2025

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 and others added 8 commits September 15, 2025 17:03
devtools has an indirect dependency on xml2 already:

pak::pkg_deps_explain("devtools", "xml2")
#> devtools -> pkgdown -> xml2
#> devtools -> roxygen2 -> xml2
#> devtools -> urlchecker -> xml2
@jennybc jennybc force-pushed the check-win-webform1 branch from ffb4b5a to 1a0d45a Compare March 2, 2026 23:51
@jennybc
Copy link
Member

jennybc commented Mar 3, 2026

Thanks!

@jennybc jennybc merged commit 33448d6 into r-lib:main Mar 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants