~ubuntu-branches/ubuntu/quantal/nginx/quantal-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-echo/t/location-async.t

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry
  • Date: 2011-09-26 10:17:04 UTC
  • mfrom: (4.2.38 sid)
  • Revision ID: package-import@ubuntu.com-20110926101704-x8pxngiujrmkxnn3
Tags: 1.1.4-2
[Kartik Mistry]
* debian/modules:
  + Updated nginx-upload-progress module, Thanks to upstream for fixing issue
    that FTBFS nginx on kFreeBSD-* archs.
  + Updated nginx-lua module to latest upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
use lib 'lib';
4
4
use Test::Nginx::Socket;
5
5
 
6
 
plan tests => 2 * blocks() - 1;
 
6
plan tests => 2 * blocks();
7
7
 
8
8
run_tests();
9
9
 
300
300
    }
301
301
--- request
302
302
    GET /unsafe
303
 
--- error_code: 500
304
 
 
305
 
 
306
 
 
307
 
=== TEST 17: access/deny
 
303
--- response_body_like: 500 Internal Server Error
 
304
 
 
305
 
 
306
 
 
307
=== TEST 17: access/deny (access phase handlers skipped in subrequests)
308
308
--- config
309
309
    location /main {
310
310
        echo_location_async /denied;
315
315
    }
316
316
--- request
317
317
    GET /main
318
 
--- error_code: 403
 
318
--- error_code: 200
319
319
--- response_body
320
 
--- SKIP
 
320
No no no
321
321
 
322
322
 
323
323
 
352
352
--- response_body chomp
353
353
hello, body!
354
354
 
 
355
 
 
356
 
 
357
=== TEST 20: leading subrequest & echo_before_body
 
358
--- config
 
359
    location /main {
 
360
        echo_before_body hello;
 
361
        echo_location_async /foo;
 
362
    }
 
363
    location /foo {
 
364
        echo world;
 
365
    }
 
366
--- request
 
367
    GET /main
 
368
--- response_body
 
369
hello
 
370
world
 
371
 
 
372
 
 
373
 
 
374
=== TEST 21: leading subrequest & xss
 
375
--- config
 
376
    location /main {
 
377
        default_type 'application/json';
 
378
        xss_get on;
 
379
        xss_callback_arg c;
 
380
        echo_location_async /foo;
 
381
    }
 
382
    location /foo {
 
383
        echo -n world;
 
384
    }
 
385
--- request
 
386
    GET /main?c=hi
 
387
--- response_body chop
 
388
hi(world);
 
389
 
 
390
 
 
391
 
 
392
=== TEST 22: multiple leading subrequest & xss
 
393
--- config
 
394
    location /main {
 
395
        default_type 'application/json';
 
396
        xss_get on;
 
397
        xss_callback_arg c;
 
398
        echo_location_async /foo;
 
399
        echo_location_async /bar;
 
400
    }
 
401
    location /foo {
 
402
        echo -n world;
 
403
    }
 
404
    location /bar {
 
405
        echo -n ' people';
 
406
    }
 
407
--- request
 
408
    GET /main?c=hi
 
409
--- response_body chop
 
410
hi(world people);
 
411