Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How to enable curl command HTTP2 support     - CentOS7 set boot directly into the command line interface (Linux)

- SQL in the specific internal Oracle process (Database)

- Setting up Linux machine through a proxy firewall (Linux)

- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)

- Migrate Oracle database files to ASM (Database)

- Understanding the Linux load average on other UNIX-Like systems (Linux)

- The specified user to execute commands under Linux (Linux)

- Configuring the remote Linux server SSH key authentication to automatically login in Mac OS X (Server)

- grep command usage (Linux)

- Linux network monitoring strategy (Linux)

- Make command tutorial (Linux)

- Linux automatic installation and implementation (Linux)

- Java developers question (Programming)

- VMware virtual machine operating system log Error in the RPC receive loop resolve (Linux)

- Ubuntu 15.10 / 14.04 install subtitling software Aegisub (Linux)

- Spring3 + SpringMVC + Hibernate4 full annotation environment configuration (Server)

- apt-get and apt-cache show command examples (Linux)

- TCP protocol flaw incomplete records (Linux)

- To install MySQL 5.6 binary packages under CentOS 6.4 64bit (Database)

- Git uses Details (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:      
 
- CentOS 7.0 local address and configure yum source address priority (Linux)
- GRUB how to load Linux kernel (Linux)
- To install Samba server on CentOS 6.6 (Server)
- Java data structures - the linear form of the single-chain applications (Programming)
- Bootable ISO image using GRUB (Linux)
- GitLab Installation Guide -Ubuntu 14.04 LTS (Server)
- Linux environmental performance data acquisition system (Linux)
- Let the router be your security barrier against external attack (Linux)
- Using the Linux VNC service (Server)
- Ubuntu Server (Ubuntu 14.04 LTS 64-bit) installation libgdiplus 2.10.9 error solution (Linux)
- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)
- Linux environment variable configuration and save places (Linux)
- C ++ handling text input (Programming)
- C ++ Learning Notes: references (Programming)
- Linux Thread Synchronization (Programming)
- How do you access Dropbox Linux command line (Linux)
- Java foundation comb: Array (Programming)
- Linux RPM default installation path (Linux)
- Oracle 11g 10g induced into error (Database)
- Oracle database online redo logs are several methods of recovery of deleted (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.