git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2e4d7e8
)
Fix test case for cookies with php >= 5
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 1 Jul 2017 13:59:46 +0000
(14:59 +0100)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 1 Jul 2017 13:59:46 +0000
(14:59 +0100)
test/testsuite.php
patch
|
blob
|
history
diff --git
a/test/testsuite.php
b/test/testsuite.php
index
e5fb6d8
..
19a4f0e
100644
(file)
--- a/
test/testsuite.php
+++ b/
test/testsuite.php
@@
-573,8
+573,15
@@
And turned it into nylon';
$rcookies = $r->cookies();
// remove extra cookies which might have been set by proxies
foreach($rcookies as $c => $v)
$rcookies = $r->cookies();
// remove extra cookies which might have been set by proxies
foreach($rcookies as $c => $v)
+ {
if(!in_array($c, array('c2', 'c3', 'c4', 'c5')))
unset($rcookies[$c]);
if(!in_array($c, array('c2', 'c3', 'c4', 'c5')))
unset($rcookies[$c]);
+ // Seems like we get this when using php-fpm and php 5.5+ ...
+ if (isset($rcookies[$c]['Max-Age']))
+ {
+ unset($rcookies[$c]['Max-Age']);
+ }
+ }
foreach($cookies as $c => $v)
// format for date string in cookies: 'Mon, 31 Oct 2005 13:50:56 GMT'
// but PHP versions differ on that, some use 'Mon, 31-Oct-2005 13:50:56 GMT'...
foreach($cookies as $c => $v)
// format for date string in cookies: 'Mon, 31 Oct 2005 13:50:56 GMT'
// but PHP versions differ on that, some use 'Mon, 31-Oct-2005 13:50:56 GMT'...