~ubuntu-branches/ubuntu/saucy/nginx/saucy-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/056-flush.t

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Cyril Lavier, Michael Lustfield, Kartik Mistry
  • Date: 2012-05-14 11:15:00 UTC
  • mfrom: (4.2.49 sid)
  • Revision ID: package-import@ubuntu.com-20120514111500-1y9ij7zulu9xnmry
Tags: 1.2.0-1
[Cyril Lavier]
* New upstream release. (Closes: #670306)
  + 1.2.x is stable release now.
* debian/modules/chunkin-nginx-module:
  + Updated chunkin-nginx-module to v0.23rc2-3-g85eca98.
* debian/modules/headers-more-module:
  + Updated headers-more-module to v0.17rc1-4-g33a82ed.
* debian/modules/nginx-development-kit:
  + Updated nginx-development-kit to v0.2.17-7-g24202b4.
* debian/modules/nginx-echo:
  + Updated nginx-echo to v0.38rc2-7-g080c0a1.
* debian/modules/nginx-lua:
  + Updated nginx-lua to v0.5.0rc25-5-g8d28785.
* debian/modules/nginx-upstream-fair:
  + Updated nginx-upstream-fair to a18b409.
* debian/modules/nginx-upload-progress:
  + Updated nginx-upload-progress to v0.9.0-0-ga788dea.
* debian/modules/naxsi:
  + Updated naxsi to 0.46
* debian/modules/README.Modules-versions:
  + Updated versions and URLs for modules.
* debian/naxsi-ui-extract, debian/naxsi-ui-intercept,
  debian/nginx-naxsi-ui.*, debian/naxsi-ui-extract.1,
  debian/naxsi-ui-intercept.1, debian/rules:
  + Added nginx-naxsi-ui package containing the learning daemon
    and the WebUI.
* debian/nginx-common.nginx.default, debian/nginx-common.nginx.init:
  + Renamed files to be compliant with the nginx-naxsi-ui package.
* debian/po:
  + Added needed files for using po-debconf.
  + Added French translation.
* debian/control:
  + Applied the modifications given after the review by Justin Rye.

[Michael Lustfield]
* debian/conf/uwsgi_params:
  + Added UWSGI_SCHEME to uwsgi_params. (Closes: #664878)
* debian/conf/sites-available/default:
  + Added allow directive for ipv6 localhost. (Closes: #664271)

[Kartik Mistry]
* debian/control:
  + wrap-and-sort.
* debian/copyright:
  + Added missing copyrights, minor formatting fixes.
* debian/nginx-common.nginx.init:
  + Added ulimit for restarts, Thanks to Daniel Roschka
    <danielroschka@phoenitydawn.de> for patch. (Closes: #673580)
* debian/conf/sites-available/default:
  + Added patch to fix deprecated "listen" directive, Thanks to
    Guillaume Plessis <gui@dotdeb.org> for patch. (Closes: #672632)

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
 
 
3
BEGIN {
 
4
    $ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1;
 
5
}
 
6
 
2
7
use lib 'lib';
3
8
use Test::Nginx::Socket;
4
9
 
8
13
#log_level('warn');
9
14
 
10
15
repeat_each(2);
11
 
#repeat_each(1);
12
16
 
13
 
plan tests => repeat_each() * (blocks() * 2);
 
17
plan tests => 82;
14
18
 
15
19
#no_diff();
16
20
#no_long_string();
32
36
--- response_body
33
37
hello, world
34
38
hiya
 
39
--- error_log
 
40
lua reuse free buf memory 13 >= 5
35
41
 
36
42
 
37
43
 
89
95
 
90
96
 
91
97
 
92
 
=== TEST 5: http 1.0
93
 
--- config
94
 
    location /test {
95
 
        content_by_lua '
96
 
            ngx.say("hello, world")
97
 
            ngx.flush(true)
98
 
            ngx.say("hiya")
99
 
        ';
100
 
    }
101
 
--- request
102
 
GET /test HTTP/1.0
103
 
--- response_body
104
 
hello, world
105
 
hiya
106
 
 
107
 
 
108
 
 
109
 
=== TEST 6: flush wait - big data
 
98
=== TEST 5: http 1.0 (sync)
 
99
--- config
 
100
    location /test {
 
101
        content_by_lua '
 
102
            ngx.say("hello, world")
 
103
            ngx.flush(true)
 
104
            ngx.say("hiya")
 
105
            ngx.flush(true)
 
106
            ngx.say("blah")
 
107
        ';
 
108
    }
 
109
--- request
 
110
GET /test HTTP/1.0
 
111
--- response_body
 
112
hello, world
 
113
hiya
 
114
blah
 
115
--- response_headers
 
116
Content-Length: 23
 
117
--- timeout: 5
 
118
--- error_log
 
119
lua buffering output bufs for the HTTP 1.0 request
 
120
lua http 1.0 buffering makes ngx.flush() a no-op
 
121
 
 
122
 
 
123
 
 
124
=== TEST 6: http 1.0 (async)
 
125
--- config
 
126
    location /test {
 
127
        content_by_lua '
 
128
            ngx.say("hello, world")
 
129
            ngx.flush(false)
 
130
            ngx.say("hiya")
 
131
            ngx.flush(false)
 
132
            ngx.say("blah")
 
133
        ';
 
134
    }
 
135
--- request
 
136
GET /test HTTP/1.0
 
137
--- response_body
 
138
hello, world
 
139
hiya
 
140
blah
 
141
--- response_headers
 
142
Content-Length: 23
 
143
--- error_log
 
144
lua buffering output bufs for the HTTP 1.0 request
 
145
lua http 1.0 buffering makes ngx.flush() a no-op
 
146
--- timeout: 5
 
147
 
 
148
 
 
149
 
 
150
=== TEST 7: flush wait - big data
110
151
--- config
111
152
    location /test {
112
153
        content_by_lua '
124
165
 
125
166
 
126
167
 
127
 
=== TEST 7: flush wait - content
 
168
=== TEST 8: flush wait - content
128
169
--- config
129
170
    location /test {
130
171
        content_by_lua '
144
185
hello, world
145
186
sub
146
187
 
 
188
 
 
189
 
 
190
=== TEST 9: http 1.0 (sync + buffering off)
 
191
--- config
 
192
    lua_http10_buffering off;
 
193
    location /test {
 
194
        content_by_lua '
 
195
            ngx.say("hello, world")
 
196
            ngx.flush(true)
 
197
            ngx.say("hiya")
 
198
            ngx.flush(true)
 
199
            ngx.say("blah")
 
200
        ';
 
201
    }
 
202
--- request
 
203
GET /test HTTP/1.0
 
204
--- response_body
 
205
hello, world
 
206
hiya
 
207
blah
 
208
--- response_headers
 
209
!Content-Length
 
210
--- timeout: 5
 
211
--- no_error_log
 
212
lua buffering output bufs for the HTTP 1.0 request
 
213
lua http 1.0 buffering makes ngx.flush() a no-op
 
214
 
 
215
 
 
216
 
 
217
=== TEST 10: http 1.0 (async)
 
218
--- config
 
219
    lua_http10_buffering on;
 
220
    location /test {
 
221
        lua_http10_buffering off;
 
222
        content_by_lua '
 
223
            ngx.say("hello, world")
 
224
            ngx.flush(false)
 
225
            ngx.say("hiya")
 
226
            ngx.flush(false)
 
227
            ngx.say("blah")
 
228
        ';
 
229
    }
 
230
--- request
 
231
GET /test HTTP/1.0
 
232
--- response_body
 
233
hello, world
 
234
hiya
 
235
blah
 
236
--- response_headers
 
237
!Content-Length
 
238
--- no_error_log
 
239
lua buffering output bufs for the HTTP 1.0 request
 
240
lua http 1.0 buffering makes ngx.flush() a no-op
 
241
--- timeout: 5
 
242
 
 
243
 
 
244
 
 
245
=== TEST 11: http 1.0 (sync) - buffering explicitly off
 
246
--- config
 
247
    location /test {
 
248
        lua_http10_buffering on;
 
249
        content_by_lua '
 
250
            ngx.say("hello, world")
 
251
            ngx.flush(true)
 
252
            ngx.say("hiya")
 
253
            ngx.flush(true)
 
254
            ngx.say("blah")
 
255
        ';
 
256
    }
 
257
--- request
 
258
GET /test HTTP/1.0
 
259
--- response_body
 
260
hello, world
 
261
hiya
 
262
blah
 
263
--- response_headers
 
264
Content-Length: 23
 
265
--- timeout: 5
 
266
--- error_log
 
267
lua buffering output bufs for the HTTP 1.0 request
 
268
lua http 1.0 buffering makes ngx.flush() a no-op
 
269
 
 
270
 
 
271
 
 
272
=== TEST 12: http 1.0 (async) - buffering explicitly off
 
273
--- config
 
274
    location /test {
 
275
        lua_http10_buffering on;
 
276
        content_by_lua '
 
277
            ngx.say("hello, world")
 
278
            ngx.flush(false)
 
279
            ngx.say("hiya")
 
280
            ngx.flush(false)
 
281
            ngx.say("blah")
 
282
        ';
 
283
    }
 
284
--- request
 
285
GET /test HTTP/1.0
 
286
--- response_body
 
287
hello, world
 
288
hiya
 
289
blah
 
290
--- response_headers
 
291
Content-Length: 23
 
292
--- error_log
 
293
lua buffering output bufs for the HTTP 1.0 request
 
294
lua http 1.0 buffering makes ngx.flush() a no-op
 
295
--- timeout: 5
 
296