[Rd] rtools40 curl cannot handle -w variables

Bill Dunlap w||||@mwdun|@p @end|ng |rom gm@||@com
Thu Feb 10 17:59:43 CET 2022


If you wrap -w's argument in double quotes then it works in both versions
of curl.

C:\Users\willi>C:\WINDOWS\system32\curl.exe -w %{url_effective}
https://mirror.ctan.org | tail -1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   298  100   298    0     0    393      0 --:--:-- --:--:-- --:--:--
394
https://mirror.ctan.org/
C:\Users\willi>C:\WINDOWS\system32\curl.exe -w "%{url_effective}"
https://mirror.ctan.org | tail -1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   295  100   295    0     0    396      0 --:--:-- --:--:-- --:--:--
397
https://mirror.ctan.org/
C:\Users\willi>
C:\Users\willi>C:\rtools40\usr\bin\curl.exe -w %{url_effective}
https://mirror.ctan.org | tail -1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   309  100   309    0     0    390      0 --:--:-- --:--:-- --:--:--
389
%url_effective
C:\Users\willi>C:\rtools40\usr\bin\curl.exe -w "%{url_effective}"
https://mirror.ctan.org | tail -1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   310  100   310    0     0    405      0 --:--:-- --:--:-- --:--:--
405
https://mirror.ctan.org

-Bill


On Thu, Feb 10, 2022 at 7:53 AM Jan Netík <netikja using gmail.com> wrote:

> Hi,
>
> I get different results when using Windows curl and curl shipped with
> rtools40.
>
> curl -Ls -o nul -w %{url_effective} --connect-timeout 30 --max-time 30
> > https://mirror.ctan.org
>
>
> returns %url_effective when in fact it shoud return the actual URL. With
> Windows curl, it works just fine.
>
> It could be due to old curl shipped with rtools40: curl 7.64.1
> (x86_64-pc-msys) libcurl/7.64.1 OpenSSL/1.1.1k zlib/1.2.11, Windows
> uses curl 7.79.1 (Windows) libcurl/7.79.1 Schannel.
>
> It seems that system2() uses rtools40 curl and this renders many things
> erroneous. Any thoughts on this?
>
> Best regards
> Jan
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list