- fix win32 build, really, for now
[m6w6/ext-http] / tests / HttpRequest_003.phpt
1 --TEST--
2 HttpRequest SSL
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkmin(5);
7 checkurl('arweb.info');
8 skipif(!http_support(HTTP_SUPPORT_SSLREQUESTS), 'need ssl-request support')
9 ?>
10 --FILE--
11 <?php
12 echo "-TEST\n";
13 $o = array('redirect' => '3', 'ssl' => array('version' => '3', 'verifyhost' => '1'));
14 $r = new HttpRequest('https://ssl.arweb.info/iworks/data.txt');
15 $r->setOptions($o);
16 $r->send();
17 var_dump($r->getResponseBody());
18 var_dump(is_object($r->getResponseMessage()));
19 var_dump(is_object($r->getResponseMessage()));
20 var_dump(is_object($r->getResponseMessage()));
21 var_dump($o);
22 $r->setOptions($o);
23 $r->send();
24 var_dump($o);
25 ?>
26 --EXPECTF--
27 %sTEST
28 string(10) "1234567890"
29 bool(true)
30 bool(true)
31 bool(true)
32 array(2) {
33 ["redirect"]=>
34 string(1) "3"
35 ["ssl"]=>
36 array(2) {
37 ["version"]=>
38 string(1) "3"
39 ["verifyhost"]=>
40 string(1) "1"
41 }
42 }
43 array(2) {
44 ["redirect"]=>
45 string(1) "3"
46 ["ssl"]=>
47 array(2) {
48 ["version"]=>
49 string(1) "3"
50 ["verifyhost"]=>
51 string(1) "1"
52 }
53 }
54