被 curl 命令輸出的 "* Expire in 0 ms for 1 (transfer 0x7f85f6002000)" 洗版了

使用 curl 命令,被一堆 * Expire in 0 ms for 1 (transfer 0x7f85f6002000) 洗版很傻眼。。。

環境 Environment

  • macOS: v10.14.6
  • iTerm2: Build 3.4.14
  • curl: v7.64.0

狀況

終於受不了每次使用 curl 命令,畫面會出現非常多的

1
2
3
4
5
6
7
8
9
10
11
12
* Expire in 2 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 2 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 2 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 2 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)
* Expire in 0 ms for 1 (transfer 0x7f85f6002000)

爬文看到有人跟我有一樣的困擾,看起來是某一版的 curl 才會出現這樣的 log output。解法就是升級 curl。

查看 curl 版本,

1
2
3
4
5
curl -V
curl 7.64.0 (x86_64-apple-darwin13.4.0) libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 libssh2/1.8.0
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy

處理方式

使用 homebrew 更新

1
2
3
4
brew upgrade curl

==> Upgrading curl
7.79.1_1 -> 7.80.0_1

務必要執行以下

1
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc

參考資料 References