- made the silently failing message parser raise some errors
[m6w6/ext-http] / tests / request_gzip.phpt
1 --TEST--
2 GZIP request
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkurl('dev.iworks.at');
7 skipif(!http_support(HTTP_SUPPORT_REQUESTS), 'need curl support');
8 ?>
9 --FILE--
10 <?php
11 echo "-TEST\n";
12
13 var_dump(http_parse_message(http_get('http://dev.iworks.at/.print_request.php?gzip=1', array('compress' => true))));
14
15 echo "Done\n";
16 --EXPECTF--
17 %sTEST
18 object(stdClass)#%d (%d) {
19 ["type"]=>
20 int(2)
21 ["httpVersion"]=>
22 float(1.1)
23 ["responseCode"]=>
24 int(200)
25 ["responseStatus"]=>
26 string(2) "OK"
27 ["headers"]=>
28 array(8) {
29 %s
30 ["Vary"]=>
31 string(15) "Accept-Encoding"
32 ["Content-Length"]=>
33 string(2) "27"
34 ["Content-Type"]=>
35 string(9) "text/html"
36 ["X-Original-Content-Encoding"]=>
37 string(4) "gzip"
38 ["X-Original-Content-Length"]=>
39 string(2) "52"
40 }
41 ["body"]=>
42 string(27) "Array
43 (
44 [gzip] => 1
45 )
46
47 "
48 ["parentMessage"]=>
49 NULL
50 }
51 Done
52