mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
- Fixed tests in ext/standard/tests/http by adding the INI setting value
allow_url_fopen=1 - Converted test file from dos line endings to unix line endings.
This commit is contained in:
parent
2c970a52e8
commit
edea1c7b45
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #38802 (ignore_errors and max_redirects)
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--FILE--
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #43510 (stream_get_meta_data() does not return same mode as used in fopen)
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--FILE--
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #48929 (duplicate \r\n sent after last header line)
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--FILE--
|
||||
|
@ -1,56 +1,57 @@
|
||||
--TEST--
|
||||
Bug #53198 (From: header cannot be changed with ini_set)
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--INI--
|
||||
from=teste@teste.pt
|
||||
--FILE--
|
||||
<?php
|
||||
require 'server.inc';
|
||||
|
||||
function do_test() {
|
||||
|
||||
$responses = array(
|
||||
"data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
|
||||
);
|
||||
|
||||
$pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
|
||||
|
||||
foreach($responses as $r) {
|
||||
|
||||
$fd = fopen('http://127.0.0.1:12342/', 'rb', false);
|
||||
|
||||
fseek($output, 0, SEEK_SET);
|
||||
var_dump(stream_get_contents($output));
|
||||
fseek($output, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
http_server_kill($pid);
|
||||
|
||||
}
|
||||
|
||||
echo "-- Test: leave default --\n";
|
||||
|
||||
do_test();
|
||||
|
||||
echo "-- Test: after ini_set --\n";
|
||||
|
||||
ini_set('from', 'junk@junk.com');
|
||||
|
||||
do_test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
-- Test: leave default --
|
||||
string(63) "GET / HTTP/1.0
|
||||
From: teste@teste.pt
|
||||
Host: 127.0.0.1:12342
|
||||
|
||||
"
|
||||
-- Test: after ini_set --
|
||||
string(62) "GET / HTTP/1.0
|
||||
From: junk@junk.com
|
||||
Host: 127.0.0.1:12342
|
||||
|
||||
"
|
||||
|
||||
--TEST--
|
||||
Bug #53198 (From: header cannot be changed with ini_set)
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
from=teste@teste.pt
|
||||
--FILE--
|
||||
<?php
|
||||
require 'server.inc';
|
||||
|
||||
function do_test() {
|
||||
|
||||
$responses = array(
|
||||
"data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
|
||||
);
|
||||
|
||||
$pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
|
||||
|
||||
foreach($responses as $r) {
|
||||
|
||||
$fd = fopen('http://127.0.0.1:12342/', 'rb', false);
|
||||
|
||||
fseek($output, 0, SEEK_SET);
|
||||
var_dump(stream_get_contents($output));
|
||||
fseek($output, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
http_server_kill($pid);
|
||||
|
||||
}
|
||||
|
||||
echo "-- Test: leave default --\n";
|
||||
|
||||
do_test();
|
||||
|
||||
echo "-- Test: after ini_set --\n";
|
||||
|
||||
ini_set('from', 'junk@junk.com');
|
||||
|
||||
do_test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
-- Test: leave default --
|
||||
string(63) "GET / HTTP/1.0
|
||||
From: teste@teste.pt
|
||||
Host: 127.0.0.1:12342
|
||||
|
||||
"
|
||||
-- Test: after ini_set --
|
||||
string(62) "GET / HTTP/1.0
|
||||
From: junk@junk.com
|
||||
Host: 127.0.0.1:12342
|
||||
|
||||
"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
http:// and ignore_errors
|
||||
--INI--
|
||||
allow_url_fopen=1
|
||||
--SKIPIF--
|
||||
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
|
||||
--FILE--
|
||||
|
Loading…
Reference in New Issue
Block a user