Mercurial > hg > nginx-site
comparison xml/en/docs/njs/reference.xml @ 2332:9d502d4305ac
Removed obsolete properties and examples from njs.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 26 Feb 2019 18:22:40 +0300 |
parents | 5eba0f7b24a9 |
children | 867fe207f13e |
comparison
equal
deleted
inserted
replaced
2331:5eba0f7b24a9 | 2332:9d502d4305ac |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="20"> | 12 rev="21"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
214 module. | 214 module. |
215 All string properties of the object are <link id="string">byte strings</link>. | 215 All string properties of the object are <link id="string">byte strings</link>. |
216 </para> | 216 </para> |
217 | 217 |
218 <para> | 218 <para> |
219 <note> | |
220 Prior to njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
221 the stream session object had some properties which are currently | |
222 <link id="stream_obsolete">removed</link>. | |
223 </note> | |
224 </para> | |
225 | |
226 <para> | |
227 <list type="tag"> | 219 <list type="tag"> |
228 | 220 |
229 <tag-name id="s_allow"><literal>s.allow()</literal></tag-name> | 221 <tag-name id="s_allow"><literal>s.allow()</literal></tag-name> |
230 <tag-desc> | 222 <tag-desc> |
231 successfully finalizes the phase handler | 223 successfully finalizes the phase handler |
348 on the <literal>warning</literal> level of logging | 340 on the <literal>warning</literal> level of logging |
349 </tag-desc> | 341 </tag-desc> |
350 | 342 |
351 </list> | 343 </list> |
352 </para> | 344 </para> |
353 | |
354 | |
355 <section id="stream_obsolete" name="Obsolete properties"> | |
356 | |
357 <para> | |
358 These properties have been removed | |
359 in njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link> | |
360 and are not backward compatible with the existing njs code. | |
361 </para> | |
362 | |
363 <para> | |
364 <list type="tag"> | |
365 | |
366 <tag-name id="s_abort"><literal>s.ABORT</literal></tag-name> | |
367 <tag-desc> | |
368 the <literal>ABORT</literal> return code | |
369 <note> | |
370 Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
371 the <link id="s_deny">s.deny()</link> method should be used instead. | |
372 </note> | |
373 </tag-desc> | |
374 | |
375 <tag-name><literal>s.AGAIN</literal></tag-name> | |
376 <tag-desc> | |
377 the <literal>AGAIN</literal> return code | |
378 <note> | |
379 Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
380 the corresponding behavior is achieved if no | |
381 <link id="s_allow">s.allow()</link>, | |
382 <link id="s_deny">s.deny()</link>, | |
383 <link id="s_decline">s.decline()</link>, | |
384 <link id="s_done">s.done()</link> | |
385 is invoked and a callback is registered. | |
386 </note> | |
387 </tag-desc> | |
388 | |
389 <tag-name id="s_buffer"><literal>s.buffer</literal></tag-name> | |
390 <tag-desc> | |
391 the current buffer, writable | |
392 <note> | |
393 Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
394 the <link id="s_send">s.send()</link> method should be used for writing. | |
395 For reading, the current buffer is available as the first argument of the | |
396 <literal>event</literal> callback. | |
397 </note> | |
398 </tag-desc> | |
399 | |
400 <tag-name><literal>s.DECLINED</literal></tag-name> | |
401 <tag-desc> | |
402 the <literal>DECLINED</literal> return code | |
403 <note> | |
404 Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
405 the <link id="s_decline">s.decline()</link> method should be used instead. | |
406 </note> | |
407 </tag-desc> | |
408 | |
409 <tag-name><literal>s.eof</literal></tag-name> | |
410 <tag-desc> | |
411 a boolean read-only property, true if the current buffer is the last buffer | |
412 <note> | |
413 Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
414 the <link id="s_on_callback_last">flags.last</link> property | |
415 should be used instead. | |
416 </note> | |
417 </tag-desc> | |
418 | |
419 <tag-name><literal>s.ERROR</literal></tag-name> | |
420 <tag-desc> | |
421 the <literal>ERROR</literal> return code | |
422 <note> | |
423 Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
424 an appropriate exception can be thrown to report an error. | |
425 </note> | |
426 </tag-desc> | |
427 | |
428 <tag-name><literal>s.fromUpstream</literal></tag-name> | |
429 <tag-desc> | |
430 a boolean read-only property, | |
431 true if the current buffer is from the upstream server to the client | |
432 <note> | |
433 Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
434 a corresponding <link id="s_on">event</link> | |
435 (<literal>upload</literal> or <literal>download</literal>) | |
436 should be used to handle data to or from client. | |
437 </note> | |
438 </tag-desc> | |
439 | |
440 <tag-name id="s_ok"><literal>s.OK</literal></tag-name> | |
441 <tag-desc> | |
442 the <literal>OK</literal> return code | |
443 <note> | |
444 Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, | |
445 the <link id="s_allow">s.allow()</link> method should be used instead. | |
446 </note> | |
447 </tag-desc> | |
448 | |
449 </list> | |
450 </para> | |
451 | |
452 </section> | |
453 | 345 |
454 </section> | 346 </section> |
455 | 347 |
456 </section> | 348 </section> |
457 | 349 |