bug64878.phpt 428 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #64878 (304 responses return Content-Type header)
  3. --INI--
  4. allow_url_fopen=1
  5. --SKIPIF--
  6. <?php
  7. include "skipif.inc";
  8. ?>
  9. --FILE--
  10. <?php
  11. include "php_cli_server.inc";
  12. php_cli_server_start('header("HTTP/1.1 304 Not Modified")', null);
  13. $headers = get_headers('http://' . PHP_CLI_SERVER_ADDRESS);
  14. echo count(array_filter($headers, function ($value) {
  15. return stripos($value, 'Content-Type') === 0;
  16. }));
  17. ?>
  18. --EXPECT--
  19. 0