xref: /curl/docs/ALTSVC.md (revision 86d33001)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7# Alt-Svc
8
9curl features support for the Alt-Svc: HTTP header.
10
11## Enable Alt-Svc in build
12
13`./configure --enable-alt-svc`
14
15(enabled by default since 7.73.0)
16
17## Standard
18
19[RFC 7838](https://datatracker.ietf.org/doc/html/rfc7838)
20
21# Alt-Svc cache file format
22
23This is a text based file with one line per entry and each line consists of nine
24space separated fields.
25
26## Example
27
28    h2 quic.tech 8443 h3-22 quic.tech 8443 "20190808 06:18:37" 0 0
29
30## Fields
31
321. The ALPN id for the source origin
332. The hostname for the source origin
343. The port number for the source origin
354. The ALPN id for the destination host
365. The hostname for the destination host
376. The port number for the destination host
387. The expiration date and time of this entry within double quotes. The date format is "YYYYMMDD HH:MM:SS" and the time zone is GMT.
398. Boolean (1 or 0) if "persist" was set for this entry
409. Integer priority value (not currently used)
41
42If the hostname is an IPv6 numerical address, it is stored with brackets such
43as `[::1]`.
44
45# TODO
46
47- handle multiple response headers, when one of them says `clear` (should
48  override them all)
49- using `Age:` value for caching age as per spec
50- `CURLALTSVC_IMMEDIATELY` support
51