Skip to content

Commit

Permalink
Document Alt-Svc related cURL constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ekinhbayar committed Nov 7, 2022
1 parent 3938ec9 commit 80bde5b
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
66 changes: 66 additions & 0 deletions reference/curl/constants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,72 @@
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlopt-altsvc">
<term>
<constant>CURLOPT_ALTSVC</constant>
(<type>string</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlopt-altsvc-ctrl">
<term>
<constant>CURLOPT_ALTSVC_CTRL</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlaltsvc-h1">
<term>
<constant>CURLALTSVC_H1</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlaltsvc-h2">
<term>
<constant>CURLALTSVC_H2</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlaltsvc-h3">
<term>
<constant>CURLALTSVC_H3</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlaltsvc-readonlyfile">
<term>
<constant>CURLALTSVC_READONLYFILE</constant>
(<type>int</type>)
</term>
<listitem>
<simpara>
Available as of PHP 8.2.0 and cURL 7.64.1.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.curlopt-header">
<term>
<constant>CURLOPT_HEADER</constant>
Expand Down
25 changes: 25 additions & 0 deletions reference/curl/functions/curl-setopt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,31 @@
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_ALTSVC</constant></entry>
<entry valign="top">
Pass the filename for cURL to use as the Alt-Svc cache file to read existing cache contents from and
possibly also write it back to a after a transfer, unless <constant>CURLALTSVC_READONLYFILE</constant>
is set via <constant>CURLOPT_ALTSVC_CTRL</constant>.
</entry>
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_ALTSVC_CTRL</constant></entry>
<entry valign="top">
Populate the bitmask with the correct set of features to instruct cURL how to handle Alt-Svc for the
transfers using this handle. cURL only accepts Alt-Svc headers over HTTPS. It will also only complete
a request to an alternative origin if that origin is properly hosted over HTTPS.
Setting any bit will enable the alt-svc engine. The options are:
<constant>CURLALTSVC_H1</constant>,
<constant>CURLALTSVC_H2</constant>,
<constant>CURLALTSVC_H3</constant>, and
<constant>CURLALTSVC_READONLYFILE</constant>.
</entry>
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_HEADER</constant></entry>
<entry valign="top">
Expand Down

0 comments on commit 80bde5b

Please sign in to comment.