xref: /aosp_15_r20/external/curl/docs/cmdline-opts/http2-prior-knowledge.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: http2-prior-knowledge
5*6236dae4SAndroid Build Coastguard WorkerTags: Versions
6*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
7*6236dae4SAndroid Build Coastguard WorkerAdded: 7.49.0
8*6236dae4SAndroid Build Coastguard WorkerMutexed: http1.1 http1.0 http2 http3
9*6236dae4SAndroid Build Coastguard WorkerRequires: HTTP/2
10*6236dae4SAndroid Build Coastguard WorkerHelp: Use HTTP 2 without HTTP/1.1 Upgrade
11*6236dae4SAndroid Build Coastguard WorkerCategory: http
12*6236dae4SAndroid Build Coastguard WorkerMulti: boolean
13*6236dae4SAndroid Build Coastguard WorkerSee-also:
14*6236dae4SAndroid Build Coastguard Worker  - http2
15*6236dae4SAndroid Build Coastguard Worker  - http3
16*6236dae4SAndroid Build Coastguard WorkerExample:
17*6236dae4SAndroid Build Coastguard Worker  - --http2-prior-knowledge $URL
18*6236dae4SAndroid Build Coastguard Worker---
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard Worker# `--http2-prior-knowledge`
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerIssue a non-TLS HTTP requests using HTTP/2 directly without HTTP/1.1 Upgrade.
23*6236dae4SAndroid Build Coastguard WorkerIt requires prior knowledge that the server supports HTTP/2 straight away.
24*6236dae4SAndroid Build Coastguard WorkerHTTPS requests still do HTTP/2 the standard way with negotiated protocol
25*6236dae4SAndroid Build Coastguard Workerversion in the TLS handshake.
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard WorkerSince 8.10.0 if this option is set for an HTTPS request then the application
28*6236dae4SAndroid Build Coastguard Workerlayer protocol version (ALPN) offered to the server is only HTTP/2. Prior to
29*6236dae4SAndroid Build Coastguard Workerthat both HTTP/1.1 and HTTP/2 were offered.
30