initial suport for "httpversion" arguments of 2.0, 2TLS, 2_PRIOR_KNOWLEDGE

This commit is contained in:
Jeff Lawson 2016-07-20 07:52:28 +00:00
parent ab766d6bca
commit 04ac7e01d3
3 changed files with 28 additions and 1 deletions

View File

@ -1244,6 +1244,18 @@ Enforce HTTP 1.0 requests.
<DD>
Enforce HTTP 1.1 requests.
<DT><B>2.0</B>
<DD>
Enforce HTTP version 2 requests.
<DT><B>2TLS</B>
<DD>
Enforce version 2 requests for HTTPS, version 1.1 for HTTP.
<DT><B>2_PRIOR_KNOWLEDGE</B>
<DD>
Enforce HTTP 2 requests without performing HTTP/1.1 Upgrade first.
</DL>
</DL>

View File

@ -1047,6 +1047,15 @@ Enforce HTTP 1.0 requests.
.TP
.B 1.1
Enforce HTTP 1.1 requests.
.TP
.B 2.0
Enforce HTTP version 2 requests.
.TP
.B 2TLS
Enforce version 2 requests for HTTPS, version 1.1 for HTTP.
.TP
.B 2_PRIOR_KNOWLEDGE
Enforce HTTP 2 requests without performing HTTP/1.1 Upgrade first.
.RE
.TP

View File

@ -294,7 +294,13 @@ CONST static char *curlFormTable[]={
};
CONST static char *httpVersionTable[] = {
"none", "1.0", "1.1", (char *)NULL
"none", /* CURL_HTTP_VERSION_NONE */
"1.0", /* CURL_HTTP_VERSION_1_0 */
"1.1", /* CURL_HTTP_VERSION_1_1 */
"2.0", /* CURL_HTTP_VERSION_2_0 */
"2TLS", /* CURL_HTTP_VERSION_2TLS */
"2_PRIOR_KNOWLEDGE", /* CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE */
(char *)NULL
};
CONST static char *netrcTable[] = {