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_basic_021.phpt ('Test curl_getinfo() function with CURLINFO_CONTENT_TYPE parameter')

Script

1: <?php
2:   
include 'server.inc';
3:   
$host curl_cli_server_start();
4:   
$url  "{$host}/get.php?test=contenttype";
5:
6:   
$ch curl_init();
7:   
curl_setopt($chCURLOPT_URL$url);
8:   
curl_exec($ch);
9:   
var_dump(curl_getinfo($chCURLINFO_CONTENT_TYPE));
10:   
curl_close($ch);
11:
?>
12:
===DONE===
13:

Expected

string(24) "text/plain;charset=utf-8"
===DONE===

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>
string(29) "text/html; charset=iso-8859-1"
===DONE===

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>
008+ string(29) "text/html; charset=iso-8859-1"
001- string(24) "text/plain;charset=utf-8"

 

Generated at Thu, 14 Nov 2019 02:24:20 +0000 (10 hours ago)

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