bug73297.phpt 608 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Bug #73297 (Ignore 100 Continue returned by HTTP/1.1 servers)
  3. --INI--
  4. allow_url_fopen=1
  5. --SKIPIF--
  6. <?php require 'server.inc'; http_server_skipif(); ?>
  7. --FILE--
  8. <?php
  9. require 'server.inc';
  10. $options = [
  11. 'http' => [
  12. 'protocol_version' => '1.1',
  13. 'header' => 'Connection: Close'
  14. ],
  15. ];
  16. $ctx = stream_context_create($options);
  17. $responses = [
  18. "data://text/plain,HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\n\r\n"
  19. . "Hello"
  20. ];
  21. ['pid' => $pid, 'uri' => $uri] = http_server($responses);
  22. echo file_get_contents($uri, false, $ctx);
  23. echo "\n";
  24. http_server_kill($pid);
  25. --EXPECT--
  26. Hello