From @|mon@@ndrew@ @end|ng |rom b@br@h@m@@c@uk  Thu Sep 12 17:36:32 2024
From: @|mon@@ndrew@ @end|ng |rom b@br@h@m@@c@uk (Simon Andrews)
Date: Thu, 12 Sep 2024 15:36:32 +0000
Subject: [Rd] Can gzfile be given the same method option as file
In-Reply-To: <20240912182302.5ddbe5a8@arachnoid>
References: <CWXP123MB619012B710931D02CF91B812D0642@CWXP123MB6190.GBRP123.PROD.OUTLOOK.COM>
 <20240912172737.1202b2bd@arachnoid>
 <CWXP123MB6190D38EB374D47862DC5E52D0642@CWXP123MB6190.GBRP123.PROD.OUTLOOK.COM>
 <20240912182302.5ddbe5a8@arachnoid>
Message-ID: <CWXP123MB6190EF5BCE48303117C82AA4D0642@CWXP123MB6190.GBRP123.PROD.OUTLOOK.COM>

? Thu, 12 Sep 2024 15:06:50 +0000
Simon Andrews <simon.andrews at babraham.ac.uk> ?????:

> > > download.file('https://seurat.nygenome.org/azimuth/references/homolo
> > > gs.rds', destfile = "c:/Users/andrewss/homologs.rds", method="curl")
<...>
> > curl: (35) schannel: next InitializeSecurityContext
> > failed: CRYPT_E_NO_REVOCATION_CHECK (0x80092012) - The revocation 
> > function was unable to check revocation for the certificate.

> This extra error code is useful, thank you for trying the "curl"
> method. https://github.com/curl/curl/issues/14315 suggests a libcurl option and a curl command line option.
> 
> Does download.file(method = 'curl', extra = '--ssl-no-revoke') work for you?

Yes!  Adding that option does indeed work and generates no warnings.

> Since R-4.2.2, R understands the R_LIBCURL_SSL_REVOKE_BEST_EFFORT environment variable. Does it help to set it > to "TRUE" (e.g. in the .Renviron file) before invoking download.file(method = "libcurl")?

Yes, this also works and will provide a workable solution for our environment

> Sys.getenv("R_LIBCURL_SSL_REVOKE_BEST_EFFORT")
[1] "TRUE"
> download.file('https://seurat.nygenome.org/azimuth/references/homologs.rds', destfile = "c:/Users/andrewss/homologs.rds", method="libcurl")
trying URL 'https://seurat.nygenome.org/azimuth/references/homologs.rds'
Content type 'application/octet-stream' length 3458249 bytes (3.3 MB)
downloaded 3.3 MB

Thank you so much for your help with this.  I shall implement this for the rest of our organisation.

Simon.



[Rd] Can gzfile be given the same method option as file
Simon Andrews