release 1.7.5
[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/ext-http/.print_request.php?gzip=1', array('compress' => true))));
14
15 echo "Done\n";
16 --EXPECTF--
17 %aTEST
18 object(stdClass)%a {
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(%d) {
29 %a
30 ["Vary"]=>
31 string(15) "Accept-Encoding"
32 ["Content-Type"]=>
33 string(9) "text/html"
34 ["X-Original-Transfer-Encoding"]=>
35 string(7) "chunked"
36 ["Content-Length"]=>
37 string(2) "26"
38 ["X-Original-Content-Encoding"]=>
39 string(4) "gzip"
40 ["X-Original-Content-Length"]=>
41 string(2) "51"
42 }
43 ["body"]=>
44 string(26) "Array
45 (
46 [gzip] => 1
47 )
48 "
49 ["parentMessage"]=>
50 NULL
51 }
52 Done
53