forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--TEST-- | ||
Test curl_getinfo() function with CURLINFO_COOKIELIST parameter | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("curl")) print "skip"; | ||
$curl_version = curl_version(); | ||
if ($curl_version['version_number'] < 0x070e01) { | ||
exit("skip: test works only with curl >= 7.14.1"); | ||
} | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
$ch = curl_init(); | ||
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C1=v1; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.php.net'); | ||
curl_setopt($ch, CURLOPT_COOKIELIST, 'Set-Cookie: C2=v2; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.php.net'); | ||
var_dump(curl_getinfo($ch, CURLINFO_COOKIELIST)); | ||
|
||
?> | ||
--EXPECT-- | ||
array(2) { | ||
[0]=> | ||
string(38) ".php.net TRUE / FALSE 2147368447 C1 v1" | ||
[1]=> | ||
string(38) ".php.net TRUE / FALSE 2147368447 C2 v2" | ||
} |