comparison js.t @ 1781:386748f328b1

Tests: updated js properties deprecated since 0.5.0.
author Dmitry Volyntsev <xeioex@nginx.com>
date Tue, 02 Aug 2022 20:35:05 -0700
parents 0979f22e3a5b
children e55aa7021ea5
comparison
equal deleted inserted replaced
1780:bd21a4a7c9f5 1781:386748f328b1
171 r.finish(); 171 r.finish();
172 } 172 }
173 173
174 function request_body(r) { 174 function request_body(r) {
175 try { 175 try {
176 var body = r.requestBody; 176 var body = r.requestText;
177 r.return(200, body); 177 r.return(200, body);
178 178
179 } catch (e) { 179 } catch (e) {
180 r.return(500, e.message); 180 r.return(500, e.message);
181 } 181 }
233 request_body_cache, send, return_method, 233 request_body_cache, send, return_method,
234 type, log, except, content_except, content_empty}; 234 type, log, except, content_except, content_empty};
235 235
236 EOF 236 EOF
237 237
238 $t->try_run('no njs available')->plan(27); 238 $t->try_run('no njs available')->plan(26);
239 239
240 ############################################################################### 240 ###############################################################################
241 241
242 like(http_get('/method'), qr/method=GET/, 'r.method'); 242 like(http_get('/method'), qr/method=GET/, 'r.method');
243 like(http_get('/version'), qr/version=1.0/, 'r.httpVersion'); 243 like(http_get('/version'), qr/version=1.0/, 'r.httpVersion');
271 like(http_get('/type?path=variables.host'), qr/200 OK.*type: string$/s, 271 like(http_get('/type?path=variables.host'), qr/200 OK.*type: string$/s,
272 'variables type'); 272 'variables type');
273 like(http_get('/type?path=rawVariables.host'), qr/200 OK.*type: buffer$/s, 273 like(http_get('/type?path=rawVariables.host'), qr/200 OK.*type: buffer$/s,
274 'rawVariables type'); 274 'rawVariables type');
275 275
276 like(http_post('/type?path=requestBody'), qr/200 OK.*type: string$/s,
277 'requestBody type');
278 like(http_post('/type?path=requestText'), qr/200 OK.*type: string$/s, 276 like(http_post('/type?path=requestText'), qr/200 OK.*type: string$/s,
279 'requestText type'); 277 'requestText type');
280 like(http_post('/type?path=requestBuffer'), qr/200 OK.*type: buffer$/s, 278 like(http_post('/type?path=requestBuffer'), qr/200 OK.*type: buffer$/s,
281 'requestBuffer type'); 279 'requestBuffer type');
282 like(http_post('/request_body_cache'), 280 like(http_post('/request_body_cache'),