On Sun, 13 Dec 2015, Michael Wood wrote:
How about posting your WIP patch, so that those who are interested in the
exact proposed semantics can have a look :)
Fair enough! I've made it run all tests fine (some annoying --libcurl tests
needed updates) and it is now split in two patches: one libcurl one and one
curl one. See attached.
--
/ daniel.haxx.se
From 4bcc532de5b639ace6f96f0a30524a08861843b1 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <[email protected]>
Date: Sun, 13 Dec 2015 09:23:36 +0100
Subject: [PATCH 1/2] http: add libcurl option to allow HTTP/2 for HTTPS only
... and stick to 1.1 for HTTP. This is in line with what browsers do and
should have very little risk.
---
docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 | 9 ++++++++-
docs/libcurl/symbols-in-versions | 1 +
include/curl/curl.h | 3 ++-
lib/http.c | 16 +++++++++-------
lib/url.c | 4 ++--
lib/vtls/gtls.c | 4 ++--
lib/vtls/mbedtls.c | 4 ++--
lib/vtls/nss.c | 4 ++--
lib/vtls/openssl.c | 8 ++++----
lib/vtls/polarssl.c | 4 ++--
10 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
index aed7c0e..262365e 100644
--- a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
+++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
@@ -43,12 +43,19 @@ it thinks fit.
.IP CURL_HTTP_VERSION_1_0
Enforce HTTP 1.0 requests.
.IP CURL_HTTP_VERSION_1_1
Enforce HTTP 1.1 requests.
.IP CURL_HTTP_VERSION_2_0
-Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.x if HTTP 2 can't be
+Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.1 if HTTP 2 can't be
negotiated with the server. (Added in 7.33.0)
+
+The alias \fICURL_HTTP_VERSION_2\fI was added in 7.43.0 to better reflect the
+actual protocol name.
+.IP CURL_HTTP_VERSION_2TLS
+Attempt HTTP 2 over TLS (HTTPS) only. libcurl will fall back to HTTP 1.1 if
+HTTP 2 can't be negotiated with the HTTPS server. For clear text HTTP servers,
+libcurl will use 1.1. (Added in 7.47.0)
.SH DEFAULT
CURL_HTTP_VERSION_NONE
.SH PROTOCOLS
HTTP
.SH EXAMPLE
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index ef7981f..629d224 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -690,10 +690,11 @@ CURL_HTTPPOST_PTRNAME 7.46.0
CURL_HTTPPOST_READFILE 7.46.0
CURL_HTTP_VERSION_1_0 7.9.1
CURL_HTTP_VERSION_1_1 7.9.1
CURL_HTTP_VERSION_2 7.43.0
CURL_HTTP_VERSION_2_0 7.33.0
+CURL_HTTP_VERSION_2TLS 7.47.0
CURL_HTTP_VERSION_NONE 7.9.1
CURL_IPRESOLVE_V4 7.10.8
CURL_IPRESOLVE_V6 7.10.8
CURL_IPRESOLVE_WHATEVER 7.10.8
CURL_LOCK_ACCESS_NONE 7.10.3
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 7fd533e..84229bb 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -1720,11 +1720,12 @@ enum {
CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
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.0 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_LAST /* *ILLEGAL* http version */
};
/* Convenience definition simple because the name of the version is HTTP/2 and
diff --git a/lib/http.c b/lib/http.c
index 3c9fde5..b77003f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1537,15 +1537,17 @@ CURLcode Curl_http_done(struct connectdata *conn,
* 1.0.
*/
static bool use_http_1_1plus(const struct SessionHandle *data,
const struct connectdata *conn)
{
- return ((data->set.httpversion >= CURL_HTTP_VERSION_1_1) ||
- ((data->set.httpversion != CURL_HTTP_VERSION_1_0) &&
- ((conn->httpversion == 11) ||
- ((conn->httpversion != 10) &&
- (data->state.httpversion != 10))))) ? TRUE : FALSE;
+ if((data->state.httpversion == 10) || (conn->httpversion == 10))
+ return FALSE;
+ if((data->set.httpversion == CURL_HTTP_VERSION_1_0) &&
+ (conn->httpversion <= 10))
+ return FALSE;
+ return ((data->set.httpversion == CURL_HTTP_VERSION_NONE) ||
+ (data->set.httpversion >= CURL_HTTP_VERSION_1_1));
}
/* check and possibly add an Expect: header */
static CURLcode expect100(struct SessionHandle *data,
struct connectdata *conn,
@@ -1783,11 +1785,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
*done = TRUE;
if(conn->httpversion < 20) { /* unless the connection is re-used and already
http2 */
switch(conn->negnpn) {
- case CURL_HTTP_VERSION_2_0:
+ case CURL_HTTP_VERSION_2:
conn->httpversion = 20; /* we know we're on HTTP/2 now */
result = Curl_http2_init(conn);
if(result)
return result;
@@ -2336,11 +2338,11 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
if(result)
return result;
if(!(conn->handler->flags&PROTOPT_SSL) &&
conn->httpversion != 20 &&
- (data->set.httpversion == CURL_HTTP_VERSION_2_0)) {
+ (data->set.httpversion == CURL_HTTP_VERSION_2)) {
/* append HTTP2 upgrade magic stuff to the HTTP request if it isn't done
over SSL */
result = Curl_http2_request_upgrade(req_buffer, conn);
if(result)
return result;
diff --git a/lib/url.c b/lib/url.c
index 13e95f4..5a83207 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1292,11 +1292,11 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
* This sets a requested HTTP version to be used. The value is one of
* the listed enums in curl/curl.h.
*/
arg = va_arg(param, long);
#ifndef USE_NGHTTP2
- if(arg == CURL_HTTP_VERSION_2_0)
+ if(arg >= CURL_HTTP_VERSION_2)
return CURLE_UNSUPPORTED_PROTOCOL;
#endif
data->set.httpversion = arg;
break;
@@ -2863,11 +2863,11 @@ static bool IsPipeliningPossible(const struct SessionHandle *handle,
handle->set.httpreq == HTTPREQ_HEAD))
/* didn't ask for HTTP/1.0 and a GET or HEAD */
return TRUE;
if(Curl_pipeline_wanted(handle->multi, CURLPIPE_MULTIPLEX) &&
- (handle->set.httpversion == CURL_HTTP_VERSION_2_0))
+ (handle->set.httpversion >= CURL_HTTP_VERSION_2))
/* allows HTTP/2 */
return TRUE;
}
return FALSE;
}
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
index 1c1cc2f..59cd7fb 100644
--- a/lib/vtls/gtls.c
+++ b/lib/vtls/gtls.c
@@ -636,11 +636,11 @@ gtls_connect_step1(struct connectdata *conn,
if(data->set.ssl_enable_alpn) {
int cur = 0;
gnutls_datum_t protocols[2];
#ifdef USE_NGHTTP2
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
protocols[cur].data = (unsigned char *)NGHTTP2_PROTO_VERSION_ID;
protocols[cur].size = NGHTTP2_PROTO_VERSION_ID_LEN;
cur++;
infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
}
@@ -1240,11 +1240,11 @@ gtls_connect_step3(struct connectdata *conn,
#ifdef USE_NGHTTP2
if(proto.size == NGHTTP2_PROTO_VERSION_ID_LEN &&
!memcmp(NGHTTP2_PROTO_VERSION_ID, proto.data,
NGHTTP2_PROTO_VERSION_ID_LEN)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else
#endif
if(proto.size == ALPN_HTTP_1_1_LENGTH &&
!memcmp(ALPN_HTTP_1_1, proto.data, ALPN_HTTP_1_1_LENGTH)) {
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 0616e68..2fbf9b8 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -372,11 +372,11 @@ mbedtls_connect_step1(struct connectdata *conn,
infof(data, "WARNING: failed to configure "
"server name indication (SNI) TLS extension\n");
}
#ifdef HAS_ALPN
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
if(data->set.ssl_enable_alpn) {
static const char* protocols[] = {
NGHTTP2_PROTO_VERSION_ID, ALPN_HTTP_1_1, NULL
};
mbedtls_ssl_conf_alpn_protocols(&connssl->config, protocols);
@@ -473,11 +473,11 @@ mbedtls_connect_step2(struct connectdata *conn,
if(next_protocol != NULL) {
infof(data, "ALPN, server accepted to use %s\n", next_protocol);
if(strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else if(strncmp(next_protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) {
conn->negnpn = CURL_HTTP_VERSION_1_1;
}
}
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index c8bd0ce..aacdd6c 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -718,11 +718,11 @@ static void HandshakeCallback(PRFileDesc *sock, void *arg)
}
#ifdef USE_NGHTTP2
if(buflen == NGHTTP2_PROTO_VERSION_ID_LEN &&
!memcmp(NGHTTP2_PROTO_VERSION_ID, buf, NGHTTP2_PROTO_VERSION_ID_LEN)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else
#endif
if(buflen == ALPN_HTTP_1_1_LENGTH &&
!memcmp(ALPN_HTTP_1_1, buf, ALPN_HTTP_1_1_LENGTH)) {
@@ -1777,11 +1777,11 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
if(data->set.ssl_enable_npn || data->set.ssl_enable_alpn) {
int cur = 0;
unsigned char protocols[128];
#ifdef USE_NGHTTP2
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN);
cur += NGHTTP2_PROTO_VERSION_ID_LEN;
}
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index fdc27b0..e5b0bb9 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -1580,16 +1580,16 @@ select_next_proto_cb(SSL *ssl,
struct connectdata *conn = (struct connectdata*) arg;
(void)ssl;
#ifdef USE_NGHTTP2
- if(conn->data->set.httpversion == CURL_HTTP_VERSION_2_0 &&
+ if(conn->data->set.httpversion >= CURL_HTTP_VERSION_2 &&
!select_next_protocol(out, outlen, in, inlen, NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN)) {
infof(conn->data, "NPN, negotiated HTTP2 (%s)\n",
NGHTTP2_PROTO_VERSION_ID);
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
return SSL_TLSEXT_ERR_OK;
}
#endif
if(!select_next_protocol(out, outlen, in, inlen, ALPN_HTTP_1_1,
@@ -1857,11 +1857,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
if(data->set.ssl_enable_alpn) {
int cur = 0;
unsigned char protocols[128];
#ifdef USE_NGHTTP2
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID_LEN;
memcpy(&protocols[cur], NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN);
cur += NGHTTP2_PROTO_VERSION_ID_LEN;
@@ -2183,11 +2183,11 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
infof(data, "ALPN, server accepted to use %.*s\n", len, neg_protocol);
#ifdef USE_NGHTTP2
if(len == NGHTTP2_PROTO_VERSION_ID_LEN &&
!memcmp(NGHTTP2_PROTO_VERSION_ID, neg_protocol, len)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else
#endif
if(len == ALPN_HTTP_1_1_LENGTH &&
!memcmp(ALPN_HTTP_1_1, neg_protocol, ALPN_HTTP_1_1_LENGTH)) {
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index cf7c344..e7bcf2f 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -357,11 +357,11 @@ polarssl_connect_step1(struct connectdata *conn,
if(data->set.ssl_enable_alpn) {
static const char* protocols[3];
int cur = 0;
#ifdef USE_NGHTTP2
- if(data->set.httpversion == CURL_HTTP_VERSION_2_0) {
+ if(data->set.httpversion >= CURL_HTTP_VERSION_2) {
protocols[cur++] = NGHTTP2_PROTO_VERSION_ID;
infof(data, "ALPN, offering %s\n", NGHTTP2_PROTO_VERSION_ID);
}
#endif
@@ -461,11 +461,11 @@ polarssl_connect_step2(struct connectdata *conn,
infof(data, "ALPN, server accepted to use %s\n", next_protocol);
#ifdef USE_NGHTTP2
if(!strncmp(next_protocol, NGHTTP2_PROTO_VERSION_ID,
NGHTTP2_PROTO_VERSION_ID_LEN)) {
- conn->negnpn = CURL_HTTP_VERSION_2_0;
+ conn->negnpn = CURL_HTTP_VERSION_2;
}
else
#endif
if(!strncmp(next_protocol, ALPN_HTTP_1_1, ALPN_HTTP_1_1_LENGTH)) {
conn->negnpn = CURL_HTTP_VERSION_1_1;
--
2.6.2
From 536f5f442e779b29ff2f28cd26a847058cdd6ed1 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <[email protected]>
Date: Sun, 13 Dec 2015 09:24:08 +0100
Subject: [PATCH 2/2] curl: use 2TLS by default
Make this the default for the curl tool (if built with HTTP/2 powers
enabled) unless a specific HTTP version is requested on the command
line.
This should allow more users to get HTTP/2 powers without having to
change anything.
---
src/tool_operate.c | 4 +++-
src/tool_setopt.c | 2 ++
tests/data/test1400 | 5 +++--
tests/data/test1401 | 5 +++--
tests/data/test1402 | 5 +++--
tests/data/test1403 | 5 +++--
tests/data/test1404 | 5 +++--
tests/data/test1405 | 5 +++--
tests/data/test1406 | 5 +++--
tests/data/test1407 | 5 +++--
tests/data/test1420 | 5 +++--
11 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/src/tool_operate.c b/src/tool_operate.c
index d5177d9..e5506c6 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -954,13 +954,15 @@ static CURLcode operate_do(struct GlobalConfig *global,
}
/* new in libcurl 7.5 */
my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
- /* new in libcurl 7.9.1 */
if(config->httpversion)
my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
+ else if(curlinfo->features & CURL_VERSION_HTTP2) {
+ my_setopt_enum(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
+ }
/* new in libcurl 7.10.6 (default is Basic) */
if(config->authtype)
my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype);
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index e11f527..ff8d407 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -68,10 +68,12 @@ const NameValueUnsigned setopt_nv_CURLAUTH[] = {
const NameValue setopt_nv_CURL_HTTP_VERSION[] = {
NV(CURL_HTTP_VERSION_NONE),
NV(CURL_HTTP_VERSION_1_0),
NV(CURL_HTTP_VERSION_1_1),
+ NV(CURL_HTTP_VERSION_2_0),
+ NV(CURL_HTTP_VERSION_2TLS),
NVEND,
};
const NameValue setopt_nv_CURL_SSLVERSION[] = {
NV(CURL_SSLVERSION_DEFAULT),
diff --git a/tests/data/test1400 b/tests/data/test1400
index 72989c4..be458bd 100644
--- a/tests/data/test1400
+++ b/tests/data/test1400
@@ -44,14 +44,15 @@ Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
<stripfile>
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
<file name="log/test1400.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
diff --git a/tests/data/test1401 b/tests/data/test1401
index d10cac2..6144bd8 100644
--- a/tests/data/test1401
+++ b/tests/data/test1401
@@ -51,14 +51,15 @@ Cookie: chocolate=chip
X-Files: Mulder
X-Men: cyclops, iceman
</protocol>
<stripfile>
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
<file name="log/test1401.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
diff --git a/tests/data/test1402 b/tests/data/test1402
index c3bf834..00395fc 100644
--- a/tests/data/test1402
+++ b/tests/data/test1402
@@ -49,14 +49,15 @@ Content-Type: application/x-www-form-urlencoded
foo=bar&baz=quux
</protocol>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
<file name="log/test1402.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
diff --git a/tests/data/test1403 b/tests/data/test1403
index 3ec7dd0..85188d8 100644
--- a/tests/data/test1403
+++ b/tests/data/test1403
@@ -46,14 +46,15 @@ Accept: */*
</protocol>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
<file name="log/test1403.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
diff --git a/tests/data/test1404 b/tests/data/test1404
index 4415697..0f59c49 100644
--- a/tests/data/test1404
+++ b/tests/data/test1404
@@ -81,14 +81,15 @@ dummy data
------------------------------9ef8d6205763--
</protocol>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
<file name="log/test1404.c" mode="text">
/********* Sample code generated by the curl command line tool **********
* All curl_easy_setopt() options are documented at:
* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
diff --git a/tests/data/test1405 b/tests/data/test1405
index 38bfd5c..5868afa 100644
--- a/tests/data/test1405
+++ b/tests/data/test1405
@@ -125,12 +125,13 @@ int main(int argc, char *argv[])
<stripfile>
# CURLOPT_USERAGENT and CURLOPT_MAXREDIRS requires HTTP protocol
# support, IOW depends on configuration - just ignore these.
$_ = '' if /CURLOPT_USERAGENT/
$_ = '' if /CURLOPT_MAXREDIRS/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
</verify>
</testcase>
diff --git a/tests/data/test1406 b/tests/data/test1406
index c80459f..8c6de5c 100644
--- a/tests/data/test1406
+++ b/tests/data/test1406
@@ -114,12 +114,13 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
</verify>
</testcase>
diff --git a/tests/data/test1407 b/tests/data/test1407
index e84463a..8ec9b44 100644
--- a/tests/data/test1407
+++ b/tests/data/test1407
@@ -92,12 +92,13 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
</verify>
</testcase>
diff --git a/tests/data/test1420 b/tests/data/test1420
index 79ca675..8894045 100644
--- a/tests/data/test1420
+++ b/tests/data/test1420
@@ -97,12 +97,13 @@ int main(int argc, char *argv[])
/**** End of sample code ****/
</file>
<stripfile>
# curl's default user-agent varies with version, libraries etc.
s/(USERAGENT, \")[^\"]+/${1}stripped/
-# CURLOPT_SSL_VERIFYPEER and SSH_KNOWNHOSTS vary with configurations - just
-# ignore them
+# CURLOPT_SSL_VERIFYPEER, SSH_KNOWNHOSTS and HTTP_VERSION vary with
+# configurations - just ignore them
$_ = '' if /CURLOPT_SSL_VERIFYPEER/
$_ = '' if /CURLOPT_SSH_KNOWNHOSTS/
+$_ = '' if /CURLOPT_HTTP_VERSION/
</stripfile>
</verify>
</testcase>
--
2.6.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html