Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How to enable curl command HTTP2 support     - Mounting Windows shared directory system under the Linux (Linux)

- On the PC goes heavy security watch your startup items (Linux)

- Python 2.7.9 Installation on Linux CentOS 6.6 (Linux)

- Inxi: Get Linux system and hardware information (Linux)

- Getting Started with Linux system to learn: how to check memory usage of Linux (Linux)

- Vim copy and paste register (Linux)

- STL source code analysis - iterator each container classification (Programming)

- To install minimize RHEL / CentOS 7 (Linux)

- Hazelcast integration with MongoDB (Database)

- Cacti installation deployment under CentOS 6.6 (Server)

- Stunning exclamation point at the Linux command line (Linux)

- CentOS7 install MySQL5.6.22 (Linux)

- Getting Started Linux Shell Scripting (Programming)

- Nonstandard IMP-00010 error processing one case (Database)

- Linux shell script to adjust the Task Scheduler (Linux)

- Elementary OS Freya global menu (Linux)

- Oracle database import and export (Database)

- CentOS How to mount the hard drive (Linux)

- Oracle table Access Control (Database)

- SpringMVC garbage processing (Programming)

 
         
  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:      
 
- Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)
- Nginx logging client ip (Server)
- Java, extends and implements Usage (Programming)
- The AWK use Cygwin tools mysql binlog log viewer (Database)
- RHEL5.8 physical opportunities to Read-only file system (Linux)
- XtraBackup achieve non-stop use of master-slave synchronization service (Database)
- AIX system file security aspects (Linux)
- CentOS 7 Test Marathon start Docker container (Server)
- Kubernetes resolve application deployment model (Server)
- Reported too many open files Linux solutions (Server)
- Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK (Linux)
- Android start automatically and add and delete a desktop shortcut (Programming)
- Installation Sublime Text 3 (Build 3065) text editor in Ubuntu (Linux)
- Running into the site-wide HTTPS (Server)
- Boot-Repair Tool - repair of frequent start-up problems (Linux)
- Linux system package manager -RPM (Linux)
- Ubucompilator-Ubuntu, Debian, Linux Mint created deb package of graphical tools (Linux)
- C language print various graphic (Programming)
- Linux Learning --- disk partition / relational representation + mount (Linux)
- Build RPM package uses Docker mirror (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.