Hey all,

for a current project I wanted to test my scripts with curl using http3. The curl that ships with macOS 14.5 doesn't support http3, I installed curl with the variant +htttp3.

The most basic command being something like

curl --http3 https://blog.cloudflare.com -I

works.

Other commands like

curl -Is -w '%header{location}' -o /dev/null https://github.com/SAP/macOS-icon-generator/releases/latest

don't work. I get an empty output and an exit code 43.

During the build phase for the curl +http3 variant I get this warning:
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
  getpass_r: found in curl-8.8.0/config.log
  _fseeki64: found in curl-8.8.0/config.log
  IoctlSocket: found in curl-8.8.0/config.log
  ioctlsocket: found in curl-8.8.0/config.log
  memrchr: found in curl-8.8.0/config.log
  CloseSocket: found in curl-8.8.0/config.log
  closesocket: found in curl-8.8.0/config.log

Using the default macports curl +ssl variant the above command

curl -Is -w '%header{location}' -o /dev/null https://github.com/SAP/macOS-icon-generator/releases/latest

gives me the expected output of https://github.com/SAP/macOS-icon-generator/releases/tag/2.0.0

The difference for the two variants is the TLS library which is gnutls for http3 and OpenSSL for the default curl.

On github there is this static curl https://github.com/stunnel/static-curl for macOS which uses openssl, supports http3 and works as expected.

I found this blog entry https://daniel.haxx.se/blog/2024/06/10/http-3-in-curl-mid-2024/ which explains to me that using openssl for http3 isn't easy and the best choice for http3. Therefore I understand using gnutls for http3 what I don't understand is that curl commands using the -w option break with gnutls and http3. Shall I file a bug report for this?

As macOS curl doesn't support http3 I won't use http3 in my script as this script needs to run on macs that don't have macports or brew installed or download curl from the above github.

Eric

Reply via email to