Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ How to enable curl command HTTP2 support     - ADSL router to defend their own network security methods (Linux)

- Installation on Ubuntu class Winamp audio player Qmmp 0.9.0 (Linux)

- To compile and install OpenCV-2.3.1 FFmpeg-2.1.2 under CentOS (Linux)

- Apache Kafka: the next generation of distributed messaging system (Server)

- Ubuntu 14.04 running ASP.NET Configuration Mono + Jexus (Server)

- Chromium Install Flash Official Guide (Linux)

- The difference between free command displays the buffers and cache (Linux)

- Ubuntu 14.04 Nvidia graphics driver installation and settings (Linux)

- CentOS6.0 successful installation and configuration OpenCV (Linux)

- Linux installation beautify early experience (Linux)

- To control based on IP address routing policy under Linux (Linux)

- Log4j configuration file Explanation (Linux)

- MongoDB version 3.2 WiredTiger storage engine performance tests (Database)

- Through eight skills to let you become a super Linux end-user (Linux)

- bash login and welcome message: / etc / issue, / etc / motd (Linux)

- Linux firewall settings instance (Linux)

- Proxmox VE implement KVM OpenVZ virtualization cloud computing (Server)

- Bash difference in single quotes and double quotes (Programming)

- Introduction and MongoDB CRUD (Database)

- Oracle delete table space prompted ORA-00604 and ORA-38301 (Database)

 
         
  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:      
 
- Swift 2.0 brief (Linux)
- iptraf: A Practical TCP / UDP network monitoring tools (Linux)
- Linux rpm command Detailed (Linux)
- Java uses JDBC connect database (Programming)
- Use Nginx as a load balancer (Server)
- Android and OpenCV2.4.4 build an image processing framework (2013 edition) (Linux)
- Understanding and Memcached MongoDB arbitration node, Zookeeper, Redis Recovery Programme Thoughts (Database)
- awk pattern matching (Programming)
- Prevent security threats caused Rootkit (Linux)
- ls command: 15 Level Linux interview question (Linux)
- HTTPS Encryption Algorithm (Linux)
- Windows using SSH management Ubuntu (Linux)
- Linux system security knowledge (Linux)
- mysqldump issue a note (Database)
- How to install Wine 1.7.20 under Ubuntu or Linux Mint (Linux)
- Ubuntu 14.10 Install Ubuntu Touch Music App 2.0 (Linux)
- xCAT line installation on CentOS 6.X (Linux)
- Examples of Exploration Class File (Programming)
- The callback function used in C ++ (Programming)
- MongoDB polymerization being given (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.