Fork me on GitHub
#clj-on-windows
<
2022-12-04
>
borkdude11:12:20

Can people running Windows in here, type curl --version and report the output + the Windows version? In a thread please.

borkdude11:12:53

Also try if this works: curl --compressed

lread17:12:50

On Windows 10 under cmd.exe:

Microsoft Windows [Version 10.0.19045.2251]
(c) Microsoft Corporation. All rights reserved.

C:\Users\lee>where curl
C:\Windows\System32\curl.exe

C:\Users\lee>curl --version
curl 7.83.1 (Windows) libcurl/7.83.1 Schannel
Release-Date: 2022-05-13
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS HSTS IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets

C:\Users\lee>curl --compressed 
curl: option --compressed: the installed libcurl version doesn't support this
curl: try 'curl --help' for more information

C:\Users\lee>

1
borkdude17:12:09

OK, I wonder about Windows 11H2. Perhaps @UBLU3FQRZ?

littleli18:12:17

Sorry I don't have an instance with Win 11 yet. But Win10 really contains stone age version of curl which does not support this. And what's even worse it's quite difficult to setup override.

borkdude18:12:41

The reason I'm asking is, I am using windows 11 and it does work for me, but I don't know if I once copied the binary from scoop into system32 😅

littleli18:12:11

scoop contains newer version of curl... but I'm still not able to run just curl but I have to use full path to scoop binary, probably because I'm unable to go on PATH before system one.

littleli18:12:40

If they ship still the old version of curl with Win11 I don't know what to say 😞 Sad.

borkdude18:12:02

that's what I'm trying to find out :)

littleli19:12:47

Depending on a usecase one can use Powershell commandlet to download a file or a page like this

Invoke-WebRequest  -OutFile C:\file.txt
It's probably capable of doing relatively broad range of functionality as a http client.

borkdude19:12:03

I'm approaching this from babashka's babashka.curl

borkdude19:12:21

Which uses --compressed by default (for a while now)

borkdude19:12:34

and this crashes when curl doesn't support that argument (unfortunately)

seancorfield21:12:47

@U04V15CAJ Stock Windows 11, latest public version:

Microsoft Windows [Version 10.0.22621.900]
(c) Microsoft Corporation. All rights reserved.

C:\Users\seanc>curl --version
curl 7.83.1 (Windows) libcurl/7.83.1 Schannel
Release-Date: 2022-05-13
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS HSTS IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI UnixSockets

C:\Users\seanc>curl --compressed 
curl: option --compressed: the installed libcurl version doesn't support this
curl: try 'curl --help' for more information

C:\Users\seanc>
So same as @UBLU3FQRZ

seancorfield21:12:59

And the very latest Windows 11 Insider build -- more recent curl but still no compressed option:

Microsoft Windows [Version 10.0.25252.1010]
(c) Microsoft Corporation. All rights reserved.

C:\Users\seanc>curl --version
curl 7.85.0 (Windows) libcurl/7.85.0 Schannel
Release-Date: 2022-09-06
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS HSTS IPv6 Kerberos Largefile NTLM SPNEGO SSL SSPI threadsafe UnixSockets

C:\Users\seanc>curl --compressed 
curl: option --compressed: the installed libcurl version doesn't support this
curl: try 'curl --help' for more information

C:\Users\seanc>

seancorfield21:12:50

Given how much MS have promoted WSL2 as the "programmers' option", I don't know how inclined they would be to expend effort on updating CMD...?

borkdude21:12:24

This isn't cmd specific, it's a binary which lives in system32 which affects the whole system

seancorfield21:12:50

C:\Users\seanc>wsl.exe curl --version
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

C:\Users\seanc>wsl.exe curl --compressed 

<!-- This site was created in Webflow. -->
<!-- Last Published: Fri Nov 13 2015 01:48:45 GMT+0000 (UTC) -->
<html lang="en" data-wf-site="56414d6fc8c27cad0f4e12e7" data-wf-page="5643ac587b1f28dc58ed6b89">
<head>
🙂

seancorfield21:12:42

(assuming you have WSL2 installed of course)

seancorfield21:12:55

I know... not helpful... I get it...

littleli21:12:06

After manual intervention in system settings, I made it working. Skilled devs will know what to do, but it's annoying that it's not working on the first run:

PowerShell 7.3.0
Loading personal and system profiles took 885ms.
~ $ curl --compressed 
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="">here</A>.
</BODY></HTML>
~ $ curl --version
curl 7.86.0 (x86_64-w64-mingw32) libcurl/7.86.0 OpenSSL/3.0.7 (Schannel) zlib/1.2.13 brotli/1.0.9 zstd/1.5.2 WinIDN libssh2/1.10.0 nghttp2/1.51.0 ngtcp2/0.11.0 nghttp3/0.7.1 libgsasl/2.2.0
Release-Date: 2022-10-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI threadsafe TLS-SRP UnixSockets zstd
~ $

borkdude22:12:44

Apparently it does help when you persist :) https://twitter.com/DHowett/status/1599530152223907840

1
👍 2
💪 1