summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-09-23 10:38:59 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-09-23 10:42:48 +0200
commit9439d65f0d74d391f9620491896a1a04bc033648 (patch)
tree162ad14cdff2989bfcbfdbc50db77dd34d02e671
parent5ed0602ec622274bf5672304ae414e5ecb2e5167 (diff)
downloadphp-git-9439d65f0d74d391f9620491896a1a04bc033648.tar.gz
Fix #77493: curl_basic_009 fails with newer curl versions
libcurl 7.62.0 introduced a maximum protocol length of 8, so this test case failed with `CURLE_URL_MALFORMAT`. While this is lifted to 40 as of libcurl 7.65.0, and this test case has already been fixed with commit e27301c[1], we restore the original intention to check for a `CURLE_UNSUPPORTED_PROTOCOL ` error. [1] <http://git.php.net/?p=php-src.git;a=commit;h=e27301c7b37f6a1643a0dc1966919bd62a32bc74>
-rw-r--r--ext/curl/tests/curl_basic_009.phpt8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/curl/tests/curl_basic_009.phpt b/ext/curl/tests/curl_basic_009.phpt
index 3b36a78540..a9aaf4c50f 100644
--- a/ext/curl/tests/curl_basic_009.phpt
+++ b/ext/curl/tests/curl_basic_009.phpt
@@ -7,7 +7,7 @@ TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
--FILE--
<?php
-$url = uniqid()."://www.".uniqid().".".uniqid();
+$url = substr(uniqid(),0,7)."://www.".uniqid().".".uniqid();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
@@ -18,6 +18,6 @@ curl_close($ch);
?>
---EXPECTREGEX--
-string\(\d+\) "([^\r\n]*rotocol[^\r\n]+|Could not resolve host: .+)"
-int\(\d\)
+--EXPECTF--
+string(%d) "%Srotocol%s"
+int(1)