PHP  
 PHP_7_1
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/curl/tests/curl_multi_getcontent_basic3.phpt ('Curl_multi_getcontent() basic test with different sources (local file/http)')

Script

1: <?php
2:     
//CURL_MULTI_GETCONTENT TEST
3:
4:     //CREATE RESOURCES
5:      
$ch1=curl_init();
6:     
$ch2=curl_init();
7:
8:     
//SET URL AND OTHER OPTIONS
9:     
include 'server.inc';
10:     
$host curl_cli_server_start();
11:     
curl_setopt($ch1CURLOPT_URL"{$host}/get.php?test=getpost&get_param=Hello%20World");
12:     
curl_setopt($ch2CURLOPT_URL"file://".dirname(__FILE__). DIRECTORY_SEPARATOR "curl_testdata2.txt");
13:     
curl_setopt($ch1CURLOPT_RETURNTRANSFERtrue);
14:     
curl_setopt($ch2CURLOPT_RETURNTRANSFERtrue);
15:
16:     
//CREATE MULTIPLE CURL HANDLE
17:     
$mh=curl_multi_init();
18:
19:     
//ADD THE 2 HANDLES
20:     
curl_multi_add_handle($mh,$ch1);
21:     
curl_multi_add_handle($mh,$ch2);
22:
23:     
//EXECUTE
24:     
$running=0;
25:     do {
26:         
curl_multi_exec($mh,$running);
27:     } while (
$running>0);
28:
29:     
$results1=curl_multi_getcontent($ch1);
30:         
$results2=curl_multi_getcontent($ch2);
31:
32:     
//CLOSE
33:      
curl_multi_remove_handle($mh,$ch1);
34:     
curl_multi_remove_handle($mh,$ch2);
35:     
curl_multi_close($mh);
36:
37:     echo 
$results1;
38:     echo 
$results2;
39:
40:
?>
41:

Expected

array(2) {
  ["test"]=>
  string(7) "getpost"
  ["get_param"]=>
  string(11) "Hello World"
}
array(0) {
}
CURL2

Output

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /responder/get.php was not found on this server.</p>
</body></html>
CURL2

Diff

001+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
002+ <html><head>
003+ <title>404 Not Found</title>
004+ </head><body>
005+ <h1>Not Found</h1>
006+ <p>The requested URL /responder/get.php was not found on this server.</p>
007+ </body></html>
001- array(2) {
002-   ["test"]=>
003-   string(7) "getpost"
004-   ["get_param"]=>
005-   string(11) "Hello World"
006- }
007- array(0) {
008- }

 

Generated at Fri, 11 Jan 2019 15:03:22 +0000 (7 days ago)

Copyright © 2005-2019 The PHP Group
All rights reserved.