~ps10gel/ubuntu/xenial/nginx/add-with-http_slice_module

« back to all changes in this revision

Viewing changes to debian/modules/nginx-echo/t/filter-used.t

  • Committer: ps10gel at gmail
  • Author(s): Christos Trochalakis, Christos Trochalakis
  • Date: 2016-05-31 19:01:25 UTC
  • Revision ID: ps10gel@gmail.com-20160531190125-o9xy03d29nhzti33
Tags: 1.10.1-1
[ Christos Trochalakis ]
* New upstream release (1.10.1)
  Fixes CVE-2016-4450
  NULL pointer dereference while writing client request body.
  (Closes: #825960)

* debian/control:
  + Generate dbgsym packages only if dh_strip supports it.
    Thanks Faidon Liambotis for the hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vi:filetype=
 
2
 
 
3
use lib 'lib';
 
4
use Test::Nginx::Socket;
 
5
 
 
6
repeat_each(2);
 
7
 
 
8
plan tests => repeat_each() * (3 * blocks());
 
9
 
 
10
no_long_string();
 
11
log_level('warn');
 
12
 
 
13
#master_on();
 
14
#workers(1);
 
15
 
 
16
run_tests();
 
17
 
 
18
__DATA__
 
19
 
 
20
=== TEST 1: filter indeed used
 
21
--- http_config
 
22
    postpone_output 1;
 
23
--- config
 
24
    location /echo {
 
25
        echo_after_body hello;
 
26
        echo world;
 
27
    }
 
28
--- request
 
29
    GET /echo
 
30
--- stap
 
31
F(ngx_http_echo_header_filter) {
 
32
    println("echo header filter called")
 
33
}
 
34
--- stap_out
 
35
echo header filter called
 
36
--- response_body
 
37
world
 
38
hello
 
39
 
 
40
 
 
41
 
 
42
=== TEST 2: filter not used
 
43
--- http_config
 
44
    postpone_output 1;
 
45
--- config
 
46
    location /echo {
 
47
        #echo_after_body hello;
 
48
        echo world;
 
49
    }
 
50
--- request
 
51
    GET /echo
 
52
--- stap
 
53
F(ngx_http_echo_header_filter) {
 
54
    println("echo header filter called")
 
55
}
 
56
--- stap_out
 
57
--- response_body
 
58
world
 
59