Possible null pointer dereference in php_http_url_mod() fixed.
[m6w6/ext-http] / tests / envresponseheader001.phpt
1 --TEST--
2 env response header
3 --SKIPIF--
4 <?php include "skipif.inc"; ?>
5 --FILE--
6 <?php
7
8 http\Env::setResponseCode(201);
9
10 http\Env::setResponseHeader("No", "way");
11 http\Env::setResponseHeader("Foo", "bar");
12 http\Env::setResponseHeader("No", null);
13 http\Env::setResponseHeader("More", array("than", "what's", "good"));
14
15
16 print_r(http\Env::getResponseCode()); echo "\n";
17 print_r(http\Env::getResponseHeader("Foo")); echo "\n";
18 print_r(http\Env::getResponseHeader());
19 print_r(http\Env::getResponseStatusForCode(201));
20
21 --EXPECTHEADERS--
22 Foo: bar
23 --EXPECTF--
24 201
25 bar
26 Array
27 (
28 [X-Powered-By] => %s
29 [Foo] => bar
30 [More] => Array
31 (
32 [0] => than
33 [1] => what's
34 [2] => good
35 )
36
37 [Content-Type] => %s
38 )
39 Created