Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.4.5
-
None
-
None
-
Unknown
Description
Can be complementary to what Aki has done with WebSockets.
Proposal
All four web containers (Jetty / Tomcat / Undertow / Netty), which CXF integrates with, support HTTP/2 over TCP (h2c) and HTTP/2 over TLS (h2). Technically it is possible to only support HTTP/2 protocol [1], but practically both HTTP/1.1 and HTTP/2 always come together. As such, the it would make sense to enhance current CXF's `ServerEngine`s implementations to turn H2 (or H2C if TLS/SSL is not configured) on, in addition to HTTP/1.1, controllable by property:
org.apache.cxf.transports.http2.enabled = true | false
At the moment, only CXF's Undertow transport (`cxf-rt-transports-http-undertow`) allows to configure HTTP/2 support using `Bus` property `org.apache.cxf.transports.http_undertow.EnableHttp2`. The proposal is to deprecate this property for removal in favor of `org.apache.cxf.transports.http2.enabled` (semantic of this property would be kept the same). Meantime, both properties will be supported, see please official documentation updates [2].
Since CXF also provides clients, it is expected to have H2 and H2C support for clients as well.
[1] https://http2.github.io/faq/#can-i-implement-http2-without-implementing-http11
[2] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=191336305