curl posting data to HTTP/1.1 even with http2 option to APNs curl posting data to HTTP/1.1 even with http2 option to APNs curl curl

curl posting data to HTTP/1.1 even with http2 option to APNs


Your problem: OpenSSL/1.0.1f

This version of OpenSSL doesn't support ALPN, which is the TLS extension needed to negotiate HTTP/2 with the HTTPS server. You need OpenSSL 1.0.2 or later for this.

Some HTTP/2 servers (like nghttp2.org) also allows NPN to be used to negotiate HTTP/2 (as that was originally used for SPDY) - and OpenSSL 1.0.1 supports that! But as browsers have dropped NPN support a while ago, the number of servers that allow this are likely to diminish over time.