Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How to enable curl command HTTP2 support     - Ubuntu 12.04 installation NVIDIA GTX750 graphics driver (Linux)

- Use OpenSSL for RSA encryption and decryption (Linux)

- Linux (CentOS) SSH login without password authentication (Linux)

- Use netcat [nc] command on Linux and Unix port scan (Server)

- Let's Encrypt with semiautomatic into Nginx configuration https (Server)

- When Linux Detailed time zone and common function of time (Linux)

- Ubuntu prompt / lack of boot space solutions (Linux)

- MySQL database to open a remote connection method (Database)

- TPCC-MySQL Benchmark (Database)

- jQuery update the content and method of use 3.0 (Programming)

- Shell Programming points to note about the function (Programming)

- Hadoop 2.2.0 installation development environment (standalone pseudo-distributed mode) (Server)

- Oracle 11g tracking and monitoring system-level triggers to drop misuse (Database)

- The difference between statement and preparedStatement of the jdbc (Database)

- How to make GRub instead of the default Ubuntu software center (Linux)

- Linux permissions Detailed (Linux)

- Java transient keyword (Programming)

- Using iptables achieve NAT (Linux)

- Transplant spider to MySQL 5.6 (Database)

- Commonly used Linux system camouflage method (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:      
 
- Linux System Getting Started Learning: Using yum to download the RPM package without installing (Linux)
- To upgrade combat MongoDB database replication sets and split versions (Database)
- OpenStack image production in the CentOS 6.2 (Linux)
- Kibana Apache Password Authentication (Server)
- To install the Contiki development toolchain on Ubuntu (Linux)
- Oracle Database Performance Optimization of memory disk (Database)
- Analysis JavaBean (Programming)
- Php and MySQL command add to the environment variable method in Linux system (Linux)
- How to upgrade Docker 1.6 on Fedora / CentOS (Server)
- Archlinux installation tutorial (Linux)
- TOAST function in PostgreSQL (Database)
- How to use scientific data Docker quickly configure the development environment (Server)
- Linux installation Jetty deployment under RedHat5 8 (Linux)
- Linux installation and configuration curl command tool (Linux)
- Differential test piece using MongoDB performance YCSB (Database)
- Compare Several MySQL environmental issues (Database)
- Linux Shell Scripting multithreading (Programming)
- Cacti Linux-based system monitoring and alarm (Linux)
- Camouflage Nginx Web server version to prevent invasion (Linux)
- Redis Design and Implementation study notes (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.