Name
easy:SetOpt_AltSvc_Ctrl -- control alt-svc behavior (V2.0)
Synopsis
easy:SetOpt_AltSvc_Ctrl(bitmask)
Function
Populate the bitmask with the correct get of features to instruct libcurl how to handle Alt-Svc for the transfers using this handle.

libcurl only accepts Alt-Svc headers over a secure transport, meaning HTTPS. It will also only complete a request to an alternative origin if that origin is properly hosted over HTTPS. These requirements are there to make sure both the source and the destination are legitimate.

Alternative services are only used when setting up new connections. If there exists an existing connection to the host in the connection pool, then that will be preferred.

Setting any bit will enable the alt-svc engine.

#CURLALTSVC_READONLYFILE
Do not write the alt-svc cache back to the file specified with #CURLOPT_ALTSVC even if it gets updated. By default a file specified with that option will be read and written to as deemed necessary.
#CURLALTSVC_H1
Accept alternative services offered over HTTP/1.1.
#CURLALTSVC_H2
Accept alternative services offered over HTTP/2. This will only be used if libcurl was also built to actually support HTTP/2, otherwise this bit will be ignored.
#CURLALTSVC_H3
Accept alternative services offered over HTTP/3. This will only be used if libcurl was also built to actually support HTTP/3, otherwise this bit will be ignored.

Inputs
bitmask
input value

Show TOC