Skip to content

Commit 9439d65

Browse files
committed
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>
1 parent 5ed0602 commit 9439d65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/curl/tests/curl_basic_009.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ TestFest 2009 - AFUP - Perrick Penet <[email protected]>
77
--FILE--
88
<?php
99

10-
$url = uniqid()."://www.".uniqid().".".uniqid();
10+
$url = substr(uniqid(),0,7)."://www.".uniqid().".".uniqid();
1111
$ch = curl_init();
1212
curl_setopt($ch, CURLOPT_URL, $url);
1313

@@ -18,6 +18,6 @@ curl_close($ch);
1818

1919

2020
?>
21-
--EXPECTREGEX--
22-
string\(\d+\) "([^\r\n]*rotocol[^\r\n]+|Could not resolve host: .+)"
23-
int\(\d\)
21+
--EXPECTF--
22+
string(%d) "%Srotocol%s"
23+
int(1)

0 commit comments

Comments
 (0)