comparison proxy_cookie.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children bff287fbf347
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
35 35
36 http { 36 http {
37 %%TEST_GLOBALS_HTTP%% 37 %%TEST_GLOBALS_HTTP%%
38 38
39 server { 39 server {
40 listen 127.0.0.1:%%PORT_0%%; 40 listen 127.0.0.1:8080;
41 server_name localhost; 41 server_name localhost;
42 42
43 location / { 43 location / {
44 proxy_pass http://127.0.0.1:%%PORT_1%%; 44 proxy_pass http://127.0.0.1:8081;
45 45
46 proxy_cookie_domain www.example.org .example.com; 46 proxy_cookie_domain www.example.org .example.com;
47 proxy_cookie_domain .$server_name.com en.$server_name.org; 47 proxy_cookie_domain .$server_name.com en.$server_name.org;
48 proxy_cookie_domain ~^(.+)\.com$ $1.org; 48 proxy_cookie_domain ~^(.+)\.com$ $1.org;
49 49
53 proxy_cookie_path ~*^/caseless/(.+)$ /$1; 53 proxy_cookie_path ~*^/caseless/(.+)$ /$1;
54 } 54 }
55 } 55 }
56 56
57 server { 57 server {
58 listen 127.0.0.1:%%PORT_1%%; 58 listen 127.0.0.1:8081;
59 server_name localhost; 59 server_name localhost;
60 60
61 location / { 61 location / {
62 if ($arg_domain) { 62 if ($arg_domain) {
63 set $sc_domain "; Domain=$arg_domain"; 63 set $sc_domain "; Domain=$arg_domain";
75 75
76 $t->run()->plan(8); 76 $t->run()->plan(8);
77 77
78 ############################################################################### 78 ###############################################################################
79 79
80 my $port = port(0); 80 my $port = port(8080);
81 81
82 is(http_get_set_cookie('/?domain=www.Example.org'), 82 is(http_get_set_cookie('/?domain=www.Example.org'),
83 'v=path=domain=; Domain=example.com', 'domain rewrite'); 83 'v=path=domain=; Domain=example.com', 'domain rewrite');
84 is(http_get_set_cookie('/?domain=.LocalHost.com'), 84 is(http_get_set_cookie('/?domain=.LocalHost.com'),
85 'v=path=domain=; Domain=.en.localhost.org', 85 'v=path=domain=; Domain=.en.localhost.org',