1# vi:filetype=
2
3use lib 'lib';
4use Test::Nginx::Socket;
5
6repeat_each(2);
7
8plan tests => repeat_each() * (3 * blocks() + 1);
9
10#no_long_string();
11log_level 'warn';
12
13run_tests();
14
15#no_diff();
16
17__DATA__
18
19=== TEST 1: xss_get is on while no xss_callback_arg & xss_output_type
20--- config
21    xss_get on; # enable cross-site GET support
22    xss_callback_arg c; # use $arg_callback
23    gzip on;
24    gzip_types application/json application/x-javascript;
25
26    location /foo {
27        default_type "application/json";
28        echo -n '{"cat":32}';
29    }
30--- more_headers
31Accept-Encoding: gzip
32--- request
33    GET /foo?c=blah
34--- response_headers
35Content-Type: application/x-javascript
36Content-Encoding: gzip
37--- response_body_like eval
38"\x{00}\x{00}\x{00}"
39
40