With Tomcat 9, nghttp fails at the upgrade step with an error message.
And curl works fine.
Here is the verbose output of curl with Tomcat :
* Trying 172.44.0.100...
* TCP_NODELAY set
* Connected to demo.server (172.44.0.100) port 8002 (#0)
> GET /hello HTTP/1.1
> Host: demo.server:8002
> User-Agent: curl/7.56.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 101
< Connection: Upgrade
< Upgrade: h2c
< Date: Fri, 30 Mar 2018 15:20:28 GMT
* 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
< accept-ranges: bytes
< etag: W/"25-1522219727000"
< last-modified: Wed, 28 Mar 2018 06:48:47 GMT
< date: Fri, 30 Mar 2018 15:20:28 GMT
<
Hello World 👋
* Connection #0 to host demo.server left intact
And here is its output with vert.x :
* TCP_NODELAY set
* Connected to demo.server (172.44.0.100) port 8002 (#0)
> GET /hello HTTP/1.1
> Host: demo.server:8002
> User-Agent: curl/7.56.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 101 Switching Protocols
< connection: upgrade
< upgrade: h2c
< content-length: 0
* 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)!
Then curl is hanging until I kill the Vert.x process (ou close the connection).