HTTP/2 尝鲜

最近发布了HTTP/2的正式标准, 下面通过简单几个步骤尝尝鲜.

软件要求:

  • Firefox/36.0 (36.0正式支持HTTP/2)
  • H20/1.0

编译和安装

1
apt-get install -y cmake
cd /tmp
git clone https://github.com/h2o/h2o.git
cd h2o
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
make
sudo make install
  • 启动
1
h2o -c examples/h2o/h2o.conf
  • 打开Firefox在地址栏中输入:
1
# HTTP
http://192.168.8.200:8080
# HTTPS
https://192.168.8.200:8081

It works

参考资料

  1. HTTP/2服务器实现清单
    https://github.com/http2/http2-spec/wiki/Implementations