summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-02-04 01:11:00 -0800
committerStanislav Malyshev <stas@php.net>2015-02-05 20:10:28 -0800
commitc3eac70c76f923147b3dc336e43f3451b2eeabb8 (patch)
tree4ac12905dfca27330b54d99fc431757b28808491 /ext
parente82e22e27bd81027ea3a92ab6a34f31727049b1e (diff)
downloadphp-git-c3eac70c76f923147b3dc336e43f3451b2eeabb8.tar.gz
Update header handling to RFC 7230
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/tests/general_functions/bug60227_2.phpt7
-rw-r--r--ext/standard/tests/general_functions/bug60227_3.phpt6
-rw-r--r--ext/standard/tests/general_functions/bug60227_4.phpt6
3 files changed, 10 insertions, 9 deletions
diff --git a/ext/standard/tests/general_functions/bug60227_2.phpt b/ext/standard/tests/general_functions/bug60227_2.phpt
index 995c364eea..2cdde78a4a 100644
--- a/ext/standard/tests/general_functions/bug60227_2.phpt
+++ b/ext/standard/tests/general_functions/bug60227_2.phpt
@@ -1,14 +1,15 @@
--TEST--
Bug #60227 (header() cannot detect the multi-line header with CR), \r before \n
+--INI--
+expose_php=0
--FILE--
<?php
header("X-foo: e\n foo");
-header("X-Foo6: e\rSet-Cookie: ID=123\n d");
echo 'foo';
?>
--EXPECTF--
+
Warning: Header may not contain more than a single header, new line detected in %s on line %d
foo
--EXPECTHEADERS--
-X-foo: e
-foo
+Content-type: text/html; charset=UTF-8
diff --git a/ext/standard/tests/general_functions/bug60227_3.phpt b/ext/standard/tests/general_functions/bug60227_3.phpt
index 8cba9b8aec..8246f17438 100644
--- a/ext/standard/tests/general_functions/bug60227_3.phpt
+++ b/ext/standard/tests/general_functions/bug60227_3.phpt
@@ -1,8 +1,9 @@
--TEST--
Bug #60227 (header() cannot detect the multi-line header with CR), \0 before \n
+--INI--
+expose_php=0
--FILE--
<?php
-header("X-foo: e\n foo");
header("X-Foo6: e\0Set-Cookie: ID=\n123\n d");
echo 'foo';
?>
@@ -10,5 +11,4 @@ echo 'foo';
Warning: Header may not contain NUL bytes in %s on line %d
foo
--EXPECTHEADERS--
-X-foo: e
-foo
+Content-type: text/html; charset=UTF-8
diff --git a/ext/standard/tests/general_functions/bug60227_4.phpt b/ext/standard/tests/general_functions/bug60227_4.phpt
index d5e2573d89..20dba1a265 100644
--- a/ext/standard/tests/general_functions/bug60227_4.phpt
+++ b/ext/standard/tests/general_functions/bug60227_4.phpt
@@ -1,8 +1,9 @@
--TEST--
Bug #60227 (header() cannot detect the multi-line header with CR), CRLF
+--INI--
+expose_php=0
--FILE--
<?php
-header("X-foo: e\r\n foo");
header("X-foo: e\r\nfoo");
echo 'foo';
?>
@@ -10,5 +11,4 @@ echo 'foo';
Warning: Header may not contain more than a single header, new line detected in %s on line %d
foo
--EXPECTHEADERS--
-X-foo: e
- foo
+Content-type: text/html; charset=UTF-8