summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-06 17:33:58 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-06 20:41:59 +0300
commitd522db0c330868d78019b17bea6c7d62694b7b04 (patch)
tree0c3e440120d48d5d3fff8a781689f58e7a874ae7
parentbf6b07cad2ecea53ac41838d7aeddc7e247c66bc (diff)
Release version 7.67.0+5v7.67.0+5
Fix tests to fail for HTTP errors
-rw-r--r--curl/manifest2
-rw-r--r--curl/tests/http.testscript7
-rw-r--r--curl/tests/https.testscript7
-rw-r--r--libcurl/manifest2
-rw-r--r--libcurl/tests/basic/driver.c17
-rw-r--r--libcurl/tests/basic/testscript10
6 files changed, 29 insertions, 16 deletions
diff --git a/curl/manifest b/curl/manifest
index 7e16819..2b67e55 100644
--- a/curl/manifest
+++ b/curl/manifest
@@ -1,6 +1,6 @@
: 1
name: curl
-version: 7.67.0+4
+version: 7.67.0+5
summary: Command line tool for transferring data with URLs
license: cURL ; MIT/X derivate license.
topics: HTTP, FTP, URL, data transfer
diff --git a/curl/tests/http.testscript b/curl/tests/http.testscript
index 98e7267..13ec3ae 100644
--- a/curl/tests/http.testscript
+++ b/curl/tests/http.testscript
@@ -4,7 +4,6 @@
: basic
:
-$* -sS 'http://www.example.com' >>~%EOO%
-%<!doctype .*>%
-%.+
-EOO
+$* --fail -sS 'http://www.example.com' >>~%EOO%
+ %.+
+ EOO
diff --git a/curl/tests/https.testscript b/curl/tests/https.testscript
index ae621ac..1dee6c0 100644
--- a/curl/tests/https.testscript
+++ b/curl/tests/https.testscript
@@ -5,10 +5,9 @@
: default
:
{
- test.options += -sS
-
- $* 'http://www.example.com' | set s;
- $* 'https://www.example.com' >"$s"
+ $* --fail -sS 'https://www.example.com' >>~%EOO%
+ %.+
+ EOO
}
: override
diff --git a/libcurl/manifest b/libcurl/manifest
index beb576c..b80d0d8 100644
--- a/libcurl/manifest
+++ b/libcurl/manifest
@@ -1,6 +1,6 @@
: 1
name: libcurl
-version: 7.67.0+4
+version: 7.67.0+5
project: curl
summary: C library for transferring data with URLs
license: cURL ; MIT/X derivate license.
diff --git a/libcurl/tests/basic/driver.c b/libcurl/tests/basic/driver.c
index 8e78ba9..4df9471 100644
--- a/libcurl/tests/basic/driver.c
+++ b/libcurl/tests/basic/driver.c
@@ -31,7 +31,22 @@ main (int argc, char* argv[])
CURLcode cr = curl_easy_perform (curl);
if (cr == CURLE_OK)
- r = 0;
+ {
+ long status;
+ cr = curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &status);
+
+ if (cr == CURLE_OK)
+ {
+ if (status < 400)
+ r = 0;
+ else
+ fprintf (stderr, "HTTP error: status code %ld\n", status);
+ }
+ else
+ fprintf (stderr,
+ "failed to get HTTP status code: %s\n",
+ curl_easy_strerror (cr));
+ }
else
fprintf (stderr,
"failed to request '%s': %s\n",
diff --git a/libcurl/tests/basic/testscript b/libcurl/tests/basic/testscript
index a2260f4..90baed2 100644
--- a/libcurl/tests/basic/testscript
+++ b/libcurl/tests/basic/testscript
@@ -5,9 +5,8 @@
: http
:
$* 'http://www.example.com' >>~%EOO%
-%<!doctype .*>%
-%.+
-EOO
+ %.+
+ EOO
: https
:
@@ -18,8 +17,9 @@ EOO
if ($c.target.class == 'windows' || \
$c.target.class == 'macos' && $c.id == 'clang-apple')
{
- $* 'http://www.example.com' | set s;
- $* 'https://www.example.com' >"$s"
+ $* 'https://www.example.com' >>~%EOO%
+ %.+
+ EOO
}
else
{