PHP  
 PHP_7_3
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_001.phpt ('Test curl_copy_handle() with simple get')

Script

1: <?php
2:
3:   
include 'server.inc';
4:   
$host curl_cli_server_start();
5:
6:   echo 
'*** Testing curl copy handle with simple GET ***' "\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:   
$copy curl_copy_handle($ch);
16:   
curl_close($ch);
17:
18:   
$curl_content curl_exec($copy);
19:   
curl_close($copy);
20:
21:   
var_dump$curl_content );
22:
?>
23:
===DONE===
24:

Expected

*** Testing curl copy handle with simple GET ***
string(106) "array(2) {
  ["test"]=>
  string(7) "getpost"
  ["get_param"]=>
  string(11) "Hello World"
}
array(0) {
}
"
===DONE===

Output

*** Testing curl copy handle with simple GET ***
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 Thu, 14 Nov 2019 02:24:20 +0000 (11 hours ago)

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