~spuul/nginx/trunk

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/023-rewrite/exit.t

  • Committer: Package Import Robot
  • Author(s): Christos Trochalakis, Christos Trochalakis
  • Date: 2014-02-13 11:41:49 UTC
  • mfrom: (1.3.32)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20140213114149-tkp78c45rzu3wr6y
Tags: 1.4.5-1
[ Christos Trochalakis ]
* New upstream release.
* debian/modules/nginx-lua:
  + Update nginx-lua to v0.9.4
* debian/nginx-naxsi-ui.preinst:
  + Fix exit status issue (Closes: #735152)
* debian/control:
  + Fix arch:all to arch:any dependencies
  + Make nginx depend on specific flavor version
* debian/nginx-*.postinst:
  + Make nginx start by default (Closes: #735551)
* debian/nginx-*.prerm:
  + No need to check for invoke-rc.d,
    correctly set the exit code on error
* debian/nginx-common.nginx.init:
  + Rewrite some parts of the initscript
  + Introduce rotate command
  + Introduce upgrade command

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
2
2
 
3
3
use lib 'lib';
4
 
use Test::Nginx::Socket;
 
4
use Test::Nginx::Socket::Lua;
5
5
 
6
6
#repeat_each(20000);
7
7
 
13
13
#log_level('warn');
14
14
#worker_connections(1024);
15
15
 
16
 
plan tests => repeat_each() * (blocks() * 2 + 3);
 
16
plan tests => repeat_each() * (blocks() * 2 + 4);
17
17
 
18
18
$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;
19
19
$ENV{TEST_NGINX_MYSQL_PORT} ||= 3306;
356
356
 
357
357
    upstream memc_a {
358
358
        server 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;
359
 
        keepalive 300 single;
 
359
        keepalive 300;
360
360
    }
361
361
 
362
362
    #upstream_list memc_cluster memc_a memc_b;
426
426
--- response_body_like: 302
427
427
--- error_code: 302
428
428
--- response_headers
429
 
Location: http://localhost:1984/foo/bar
 
429
Location: http://localhost:$ServerPort/foo/bar
430
430
--- SKIP
431
431
 
432
432
 
543
543
 
544
544
 
545
545
 
546
 
=== TEST 17: encode args table with a multi-value arg.
 
546
=== TEST 17: exit with 204 (HTTP 1.1)
547
547
--- config
548
548
    location = /t {
549
549
        rewrite_by_lua '
559
559
--- request
560
560
GET /t
561
561
--- more_headers2
 
562
--- stap2
 
563
F(ngx_http_send_header) {
 
564
    printf("send header\n")
 
565
    print_ubacktrace()
 
566
}
 
567
--- response_body
 
568
--- error_code: 204
 
569
--- no_error_log
 
570
[error]
 
571
 
 
572
 
 
573
 
 
574
=== TEST 18: exit with 204 (HTTP 1.0)
 
575
--- config
 
576
    location = /t {
 
577
        rewrite_by_lua '
 
578
            ngx.exit(204)
 
579
        ';
 
580
 
 
581
        proxy_pass http://127.0.0.1:$server_port/blah;
 
582
    }
 
583
 
 
584
    location = /blah {
 
585
        echo blah;
 
586
    }
 
587
--- request
 
588
GET /t HTTP/1.0
 
589
--- more_headers2
 
590
--- stap2
 
591
F(ngx_http_send_header) {
 
592
    printf("send header\n")
 
593
    print_ubacktrace()
 
594
}
562
595
--- response_body
563
596
--- error_code: 204
564
597
--- no_error_log