Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How to enable curl command HTTP2 support     - Linux command line under HTTP traffic sniffing tool: httpry (Linux)

- Hadoop 0.23 compile common errors (Server)

- Fatal NI connect error 12170 error in Alert Log (Database)

- Configuring ftp server and nfs server under Linux (Server)

- Setting Linux desktop environment, achieve HiDPI display support (Linux)

- ImportTsv-HBase data import tool (Database)

- Oracle Database import and export combat (Database)

- Hadoop upload files error solved (Server)

- Ora-1092: OPI colleague K aborting process --- killed by OO Well killer (Database)

- Using Ruby to build a simple HTTP service and sass environment (Server)

- JBPM6 Tutorial - taught you how to install JBPM (Linux)

- PXE install CentOS 6.4 (Linux)

- shell script: the number of characters in the text to print no more than 6 words (Programming)

- Linux command ls (Linux)

- Linux port scanning (Linux)

- Red Hat Linux mount U disk (Linux)

- Linux NIC driver and version information (Linux)

- PXE installation of Linux servers (Server)

- Use the dd command to the hard disk I / O performance test (Linux)

- Linux firewall iptables beginner tutorial (Linux)

 
         
  How to enable curl command HTTP2 support
     
  Add Date : 2018-11-21      
         
         
         
  When we directly use the curl to request a https page, you can see the default default returns HTTP1.1 the response. Now use HTTP2 website more and more, technology is more mature, how to enable curl command HTTP 2 support becomes a problem.

curl -I https://nghttp2.org/

When we tried to use http2 parameters, it will return a non-supported protocols "curl: (1) Unsupported protocol" error:

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

We can use the following command to see the curl version:

curl --version

We can see that the current protocol version and features curl and supported without the support HTTP2.

Enable curl command HTTP2 support

Compile and install nghttp2

In order to curl support HTTP2 we need to install nghttp2 (http2 C library):

# Install the compiler tools
sudo apt-get install git g ++ make binutils autoconf automake autotools-dev libtool pkg-config \
  zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \
  libjemalloc-dev cython python3-dev python-setuptools

# Compiler installation nghttp2
git clone https://github.com/tatsuhiro-t/nghttp2.git
cd nghttp2
autoreconf -i
automake
autoconf
./configure
make
sudo make install
Upgrade curl version

cd ~
sudo apt-get build-dep 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

echo '/ usr / local / lib'> /etc/ld.so.conf.d/local.conf
ldconfig
After the upgrade finished version, will be released again when we view the curl version properties will increase HTTP2 function support. At this point -http2 parameters can be used as normal

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

We then use the following command to test to see abc.com Homepage:

curl --http2 -I https://www.abc.com
     
         
         
         
  More:      
 
- RedHat Performance Tuning (Server)
- Via Twitter how open source library to be used anywhere Emoji emoticons (Linux)
- How to modify the Linux NIC eth1 to eth0 (Linux)
- How to build Mono 3.4.0 / 3.4.1 on Windows (Linux)
- Ubuntu install virtual machine software VirtualBox 4.3.10 (Linux)
- Protect against network attacks using Linux system firewall (Linux)
- RabbitMQ tutorial examples: the Hello RabbitMQ World Java realization (Linux)
- Use virt-manager to create and manage virtual machines (Linux)
- How to install Git client in Ubuntu (Linux)
- Flask deploy applications using Nginx on Ubuntu (Server)
- How to use tmpfs in RHEL / CentOS 7.0 (Linux)
- MySQL5.6.12 Waiting for commit lock lead to hang from the library housing problem analysis (Database)
- Spring AOP (Programming)
- Boot automatically remove Linux operating history records (Linux)
- Linux system file directory structure Introduction (Linux)
- Necessity in Java packages (Programming)
- Linux suffered SYN flood attack setting (Linux)
- Two strokes to improve development productivity Struts2 (Programming)
- Ubuntu prevent arp attacks (Linux)
- wget command examples (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.