c4d3a1212bc9d266c96a9da0ac41744db4b02c47
[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(6) {
29 %s
30 ["Vary"]=>
31 string(15) "Accept-Encoding"
32 ["Content-Type"]=>
33 string(9) "text/html"
34 ["Content-Length"]=>
35 string(2) "27"
36 }
37 ["body"]=>
38 string(27) "Array
39 (
40 [gzip] => 1
41 )
42
43 "
44 ["parentMessage"]=>
45 NULL
46 }
47 Done
48