日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

curl 支持ws吗_curl 支持 http2

發布時間:2025/4/5 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 curl 支持ws吗_curl 支持 http2 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

讓 curl 支持 HTTP2 我們需要安裝 nghttp2(http2 的 C 語言庫)

源碼安裝

安裝 nghttp2

git clone https://github.com/tatsuhiro-t/nghttp2.git

cd nghttp2

autoreconf -i

automake

autoconf

./configure

make

sudo make install

編譯 curl

wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2

tar -xvjf curl-7.46.0.tar.bz2

cd curl-7.46.0

./configure --with-nghttp2=/usr/local --with-ssl

sudo make && make install

編譯時注意觀察

HTTP2 support: enabled (nghttp2)

echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf

ldconfig

驗證

curl --version

curl 7.64.1 (x86_64-pc-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2k zlib/1.2.7 nghttp2/1.38.0-DEV

Release-Date: 2019-03-27

Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp

Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets

測試

curl --http2 -I https://nghttp2.org

HTTP/2 200

date: Mon, 15 Apr 2019 12:53:49 GMT

content-type: text/html

last-modified: Fri, 08 Mar 2019 12:33:02 GMT

etag: "5c8260fe-19d8"

accept-ranges: bytes

content-length: 6616

x-backend-header-rtt: 0.011655

strict-transport-security: max-age=31536000

server: nghttpx

總結

以上是生活随笔為你收集整理的curl 支持ws吗_curl 支持 http2的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。