]> granicus.if.org Git - php/commitdiff
Fix curl tests wrt. AppVeyor and curl updates
authorAnatol Belski <ab@php.net>
Fri, 18 May 2018 15:39:12 +0000 (17:39 +0200)
committerAnatol Belski <ab@php.net>
Fri, 18 May 2018 15:39:12 +0000 (17:39 +0200)
ext/curl/tests/bug48203-win32.phpt
ext/curl/tests/bug54798-win32.phpt
ext/curl/tests/server.inc

index 947c33a3d126743ecc7e5565336d3bdb55b4f4ca..d3affdb71d0ec90e84bc03ea140a62c9057caed8 100644 (file)
@@ -30,7 +30,8 @@ echo "Ok\n";
 <?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
 --EXPECTF--
 Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
-Hello World!
-Hello World!Ok
 %A
+Hello World!
+Hello World!* Closing connection 0
+Ok
 
index c3b240dea761e38c4b90252c9483493139c3ae18..bce39903ba19cc9e34cae7effd8696f8b0b184a9 100644 (file)
@@ -65,4 +65,3 @@ Hello World!Ok for CURLOPT_FILE
 
 %AOk for CURLOPT_INFILE
 ===DONE===
-%A
index ed351b72cb0b9ea4cb62c543faf5040455577213..27f0cbbc84d74ec7ef76b5055e1151b32c27275e 100644 (file)
@@ -13,17 +13,23 @@ function curl_cli_server_start() {
     $doc_root = __DIR__;
     $router = "responder/get.php";
 
-    $descriptorspec = array(
-        0 => STDIN,
-        1 => STDOUT,
-        2 => STDERR,
-    );
-
     if (substr(PHP_OS, 0, 3) == 'WIN') {
+        $descriptorspec = array(
+            0 => STDIN,
+            1 => STDOUT,
+            2 => array("pipe", "w"),
+        );
+
         $cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
         $cmd .= " {$router}";
         $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true,  "suppress_errors" => true));
     } else {
+        $descriptorspec = array(
+            0 => STDIN,
+            1 => STDOUT,
+            2 => STDERR,
+        );
+
         $cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
         $cmd .= " {$router}";
         $cmd .= " 2>/dev/null";