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_copy_handle_basic_004.phpt ('Test curl_copy_handle() after exec()')

Script

1: <?php
2:
3:   
include 'server.inc';
4:   
$host curl_cli_server_start();
5:
6:   echo 
'*** Test curl_copy_handle() after exec() ***' "\n";
7:
8:   
$url "{$host}/get.php?test=getpost&get_param=Hello%20World";
9:   
$ch curl_init();
10:
11:   
ob_start(); // start output buffering
12:   
curl_setopt($chCURLOPT_RETURNTRANSFER1);
13:   
curl_setopt($chCURLOPT_URL$url); //set the url we want to use
14:
15:
16:   
$curl_content curl_exec($ch);
17:   
$copy curl_copy_handle($ch);
18:   
curl_close($ch);
19:
20:   
$curl_content_copy curl_exec($copy);
21:   
curl_close($copy);
22:
23:   
var_dump$curl_content_copy );
24:
?>
25:
===DONE===
26:

Expected

*** Test curl_copy_handle() after exec() ***
string(106) "array(2) {
  ["test"]=>
  string(7) "getpost"
  ["get_param"]=>
  string(11) "Hello World"
}
array(0) {
}
"
===DONE===

Output

*** Test curl_copy_handle() after exec() ***
string(215) "<!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>
"
===DONE===

Diff

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

 

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

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