HTTP
HTTP/2
# Server-side
HTTP/1.1 101 Switching!
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
Content-Length: 6
Content-Type: text/html
lies!
HTTP/1.1 101 Switching!
# listen to the upgrade request!
upgrade
# Client-side
http
http/2
HTTP/2 upgrade with lying server
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http2
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Connection: Upgrade, HTTP2-Settings
Upgrade: %H2CVER
HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
# CURLE_HTTP2: Send failure: Broken pipe
16