--TEST-- Cookie samesite --SKIPIF-- --INI-- sp.configuration_file={PWD}/config/config_samesite_cookies.ini --COOKIE-- super_cookie=if_there_is_no_cookie_here_there_is_no_header_list --ENV-- return << count($headers)) { echo "Fewer headers are being sent than expected - aborting"; return; } do { if (strncmp(current($headers), 'Set-Cookie:', 11) !== 0) { continue; } if (current($headers) === current($expected)) { $i--; } else { echo "Header mismatch:\n\tExpected: " .current($expected) ."\n\tReceived: ".current($headers)."\n"; } next($expected); } while (next($headers) !== FALSE); echo ($i === 0) ? 'OK' : 'A total of '.$i.' errors found.'; ?> --EXPECT-- OK