~ubuntu-branches/ubuntu/trusty/nginx/trusty-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/072-conditional-get.t

  • Committer: Package Import Robot
  • Author(s): Cyril Lavier, Cyril Lavier
  • Date: 2012-06-27 13:52:03 UTC
  • mfrom: (4.2.51 sid)
  • Revision ID: package-import@ubuntu.com-20120627135203-82rzqkajfpo1m77u
Tags: 1.2.1-2
[Cyril Lavier]
* Urgency set to medium, security bug in naxsi module, fix via upstream.
* debian/modules/naxsi:
  + Updated naxsi module to version 0.46-1 fixing the following security
    issue : potential file disclosure in nx_extract.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
 
2
use lib 'lib';
 
3
use Test::Nginx::Socket;
 
4
 
 
5
#worker_connections(1014);
 
6
#master_on();
 
7
#workers(2);
 
8
#log_level('warn');
 
9
 
 
10
repeat_each(2);
 
11
#repeat_each(1);
 
12
 
 
13
plan tests => repeat_each() * (blocks() * 3);
 
14
 
 
15
#no_diff();
 
16
#no_long_string();
 
17
run_tests();
 
18
 
 
19
__DATA__
 
20
 
 
21
=== TEST 1: If-Modified-Since true
 
22
--- config
 
23
    location /lua {
 
24
        content_by_lua '
 
25
            ngx.header.last_modified = "Thu, 10 May 2012 07:50:59 GMT"
 
26
            ngx.say("hello")
 
27
        ';
 
28
    }
 
29
--- request
 
30
GET /lua
 
31
--- more_headers
 
32
If-Modified-Since: Thu, 10 May 2012 07:50:59 GMT
 
33
--- response_body
 
34
--- error_code: 304
 
35
--- no_error_log
 
36
[error]
 
37
 
 
38
 
 
39
 
 
40
=== TEST 2: If-Modified-Since true
 
41
--- config
 
42
    location /lua {
 
43
        if_modified_since before;
 
44
        content_by_lua '
 
45
            ngx.header.last_modified = "Thu, 10 May 2012 07:50:48 GMT"
 
46
            ngx.say("hello")
 
47
        ';
 
48
    }
 
49
--- request
 
50
GET /lua
 
51
--- more_headers
 
52
If-Modified-Since: Thu, 10 May 2012 07:50:59 GMT
 
53
--- response_body
 
54
--- error_code: 304
 
55
--- no_error_log
 
56
[error]
 
57
 
 
58
 
 
59
 
 
60
=== TEST 3: If-Unmodified-Since false
 
61
--- config
 
62
    location /lua {
 
63
        #if_modified_since before;
 
64
        content_by_lua '
 
65
            ngx.header.last_modified = "Thu, 10 May 2012 07:50:48 GMT"
 
66
            ngx.say("hello")
 
67
        ';
 
68
    }
 
69
--- request
 
70
GET /lua
 
71
--- more_headers
 
72
If-Unmodified-Since: Thu, 10 May 2012 07:50:47 GMT
 
73
--- response_body_like: 412 Precondition Failed
 
74
--- error_code: 412
 
75
--- error_log
 
76
failed to send data through the output filters
 
77