Files
Yusuke Kuoka 0ff49e5057 feat: Add H2C support
`podinfo --h2c` allows upgrading a HTTP/1.1 connection to HTTP/2 Cleartext.

This allows `podinfo` to be used in e.g. a H2C load-test like `echo "GET http://localhost:9898/status/200" | vegeta -h2c`, or a H2C connectivity test like done with `curl -v http2 http://localhost:9898/status/200`.

I have manually verified this to work by running `curl -v --http2` on macOS and seeing the H2C upgrade happens onl when `-h2c` is provided to `podinfo`.

Without `-h2c`:

```
$ curl -v --http2 localhost:9898/status/200
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0)
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Mon, 04 Nov 2019 04:58:01 GMT
< Content-Length: 19
<
{
  "status": 200
* Connection #0 to host localhost left intact
}
```

With `-h2c`:

```
$ curl -v --http2 localhost:9898/status/200
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0)
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 101 Switching Protocols
< Connection: Upgrade
< Upgrade: h2c
* Received 101
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< content-type: application/json; charset=utf-8
< x-content-type-options: nosniff
< content-length: 19
< date: Mon, 04 Nov 2019 04:58:28 GMT
<
{
  "status": 200
* Connection #0 to host localhost left intact
}
`
2019-11-04 14:10:50 +09:00
..
2019-08-07 15:54:03 +03:00
2019-08-04 00:34:12 +01:00
2019-08-07 14:17:35 +03:00
2018-08-20 11:26:08 +03:00
2018-10-26 18:20:54 +03:00
2019-08-07 14:17:35 +03:00
2018-10-26 18:20:54 +03:00
2019-09-27 11:52:22 +03:00
2019-08-07 14:17:35 +03:00
2018-09-10 01:29:49 +03:00
2019-08-07 14:17:35 +03:00
2018-08-20 11:24:49 +03:00
2019-08-07 14:17:35 +03:00
2018-08-20 11:28:06 +03:00
2019-08-07 14:17:35 +03:00
2019-08-06 15:05:15 +03:00
2019-10-12 17:41:21 +03:00
2018-08-20 11:25:36 +03:00
2019-10-12 17:41:21 +03:00
2019-08-07 14:17:35 +03:00
2019-09-27 11:52:22 +03:00
2019-08-07 14:17:35 +03:00
2019-11-04 14:10:50 +09:00
2018-08-20 11:25:15 +03:00
2019-08-07 14:17:35 +03:00
2019-08-07 14:17:35 +03:00
2019-08-07 14:17:35 +03:00
2018-08-20 11:23:13 +03:00
2019-08-07 14:17:35 +03:00