mirror of
https://github.com/curl/curl.git
synced 2026-04-28 11:52:12 +03:00
curl.h: switch CURL_HTTP_VERSION* enums to long constants
It fixes tests 1539, and 2402, 2404 (for non-Secure Transport), on macOS with the gcc compiler. Also unignore these tests in GHA/macos for non-secure transport. Ref:c349bd668c#14097 (issue 15.) Ref:7b0240c077#16539 Ref:2ec00372a1#16482 Closes #16580
This commit is contained in:
parent
f9ec5d89cb
commit
fd54bed51a
3 changed files with 21 additions and 24 deletions
|
|
@ -2293,26 +2293,25 @@ typedef enum {
|
|||
/* Convenient "aliases" */
|
||||
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
|
||||
|
||||
/* These enums are for use with the CURLOPT_HTTP_VERSION option. */
|
||||
enum {
|
||||
CURL_HTTP_VERSION_NONE, /* setting this means we do not care, and that we
|
||||
would like the library to choose the best
|
||||
possible for us! */
|
||||
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
||||
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
||||
CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
|
||||
CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
|
||||
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
|
||||
Upgrade */
|
||||
CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
|
||||
needed. For HTTPS only. For HTTP, this option
|
||||
makes libcurl return error. */
|
||||
CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
|
||||
only. For HTTP, this makes libcurl
|
||||
return error. */
|
||||
|
||||
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
||||
};
|
||||
/* These constants are for use with the CURLOPT_HTTP_VERSION option. */
|
||||
#define CURL_HTTP_VERSION_NONE 0L /* setting this means we do not care, and
|
||||
that we would like the library to choose
|
||||
the best possible for us! */
|
||||
#define CURL_HTTP_VERSION_1_0 1L /* please use HTTP 1.0 in the request */
|
||||
#define CURL_HTTP_VERSION_1_1 2L /* please use HTTP 1.1 in the request */
|
||||
#define CURL_HTTP_VERSION_2_0 3L /* please use HTTP 2 in the request */
|
||||
#define CURL_HTTP_VERSION_2TLS 4L /* use version 2 for HTTPS, version 1.1 for
|
||||
HTTP */
|
||||
#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
|
||||
HTTP/1.1 Upgrade */
|
||||
#define CURL_HTTP_VERSION_3 30L /* Use HTTP/3, fallback to HTTP/2 or
|
||||
HTTP/1 if needed. For HTTPS only. For
|
||||
HTTP, this option makes libcurl
|
||||
return error. */
|
||||
#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
|
||||
HTTPS only. For HTTP, this makes
|
||||
libcurl return error. */
|
||||
#define CURL_HTTP_VERSION_LAST 32L /* *ILLEGAL* http version */
|
||||
|
||||
/* Convenience definition simple because the name of the version is HTTP/2 and
|
||||
not 2.0. The 2_0 version of the enum name was set while the version was
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue