# HG changeset patch # User Yaroslav Zhuravlev # Date 1594884157 -3600 # Node ID 44792f1ee284a1db54292670188b12e054b75c22 # Parent 2edc64c05b0e9384e49c28a2d74b811e35dc7b2c Added IDs to methods in njs Reference. diff --git a/xml/en/docs/njs/changes.xml b/xml/en/docs/njs/changes.xml --- a/xml/en/docs/njs/changes.xml +++ b/xml/en/docs/njs/changes.xml @@ -9,7 +9,7 @@
@@ -342,7 +342,7 @@ nginx modules: Feature: added detached mode for -r.subrequest(). +r.subrequest(). Responses to detached subrequests are ignored. Unlike ordinary subrequests, a detached subrequest can be created inside a variable handler. @@ -511,9 +511,9 @@ nginx modules: Feature: added Promise support for -r.subrequest(). +r.subrequest(). If a callback is not provided, -r.subrequest() +r.subrequest() returns an ordinary Promise object that resolves to a subrequest response object. @@ -1449,7 +1449,7 @@ getting of special response headers in Improvement: working with unknown methods in -r.subrequest(). +r.subrequest(). @@ -1457,7 +1457,7 @@ working with unknown methods in Improvement: added support for null as a second argument of -r.subrequest(). +r.subrequest(). @@ -2132,7 +2132,7 @@ added support for setting nginx variable Bugfix: fixed -r.subrequest() +r.subrequest() for empty body value. diff --git a/xml/en/docs/njs/reference.xml b/xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml +++ b/xml/en/docs/njs/reference.xml @@ -9,7 +9,7 @@
+ rev="47">
@@ -40,7 +40,8 @@ List of all njs properties and methods c The HTTP request object is available only in the ngx_http_js_module module. -All string properties of the object are byte strings. +All string properties of the object are +byte strings. @@ -49,13 +50,13 @@ All string properties of the object are request arguments object, read-only -r.error(string) +r.error(string) writes a string to the error log on the error level of logging -r.finish() +r.finish() finishes sending a response to the client @@ -145,7 +146,7 @@ are separated by commas. -r.httpVersion +r.httpVersion HTTP version, read-only @@ -158,13 +159,13 @@ it is considered a named location. The actual redirect happens after the handler execution is completed. -r.log(string) +r.log(string) writes a string to the error log on the info level of logging -r.method +r.method HTTP method, read-only @@ -174,7 +175,7 @@ HTTP method, read-only references the parent request object -r.remoteAddress +r.remoteAddress client address, read-only @@ -236,13 +237,13 @@ The property is available only in the r.responseBody -holds the subrequest response body, read-only. +holds the subrequest response body, read-only. The size of r.responseBody is limited by the directive. -r.return(status[, string]) +r.return(status[, string]) sends the entire response with the specified status to the client @@ -253,7 +254,7 @@ or the response body text (for other cod -r.send(string) +r.send(string) sends a part of the response body to the client @@ -263,12 +264,12 @@ sends a part of the response body to the sends the HTTP headers to the client -r.status +r.status status, writable -r.subrequest(uri[, +r.subrequest(uri[, options[, callback]]) creates a subrequest with the given uri and @@ -349,7 +350,7 @@ nginx variables object, writable (since 0.2.8) -r.warn(string) +r.warn(string) writes a string to the error log on the warning level of logging @@ -398,13 +399,13 @@ or finalizes it with the specified numer (0.2.4). -s.error(string) +s.error(string) writes a sent string to the error log on the error level of logging -s.log(string) +s.log(string) writes a sent string to the error log on the info level of logging @@ -454,7 +455,7 @@ a boolean value, true if data is a last -s.remoteAddress +s.remoteAddress client address, read-only @@ -490,7 +491,7 @@ nginx variables object, writable (since 0.2.8) -s.warn(string) +s.warn(string) writes a sent string to the error log on the warning level of logging @@ -645,7 +646,7 @@ Returns null if a cha found in the string. -String.prototype.toString([encoding]) +String.prototype.toString([encoding]) If no encoding is specified, @@ -881,7 +882,7 @@ try { -appendFileSync(filename, +appendFileSync(filename, data[, options]) Synchronously appends specified data @@ -951,7 +952,7 @@ by default is false. -readFileSync(filename[, +readFileSync(filename[, options]) Synchronously returns the contents of the file @@ -1035,7 +1036,7 @@ Synchronously unlinks a file by 0.3.9). -writeFileSync(filename, +writeFileSync(filename, data[, options]) diff --git a/xml/ru/docs/njs/reference.xml b/xml/ru/docs/njs/reference.xml --- a/xml/ru/docs/njs/reference.xml +++ b/xml/ru/docs/njs/reference.xml @@ -50,13 +50,13 @@ ECMAScript. объект аргументов запроса, только чтение -r.error(строка) +r.error(строка) записывает строку в лог-файл ошибок на уровне лога error -r.finish() +r.finish() завершает отправку ответа клиенту @@ -147,7 +147,7 @@ Foo: b -r.httpVersion +r.httpVersion версия HTTP, только чтение @@ -160,23 +160,23 @@ Foo: b Перенаправление осуществляется после завершения выполнения обработчика. -r.log(строка) +r.log(строка) записывает строку в лог-файл ошибок на уровне лога info -r.method +r.method HTTP метод, только чтение -r.parent +r.parent ссылается на родительский объект запроса -r.remoteAddress +r.remoteAddress адрес клиента, только чтение @@ -238,12 +238,12 @@ r.rawHeadersIn.filter(v=>v[0].toLowerCas r.responseBody -хранит тело ответа подзапроса, только чтение. +хранит тело ответа подзапроса, только чтение. Размер r.responseBody ограничивается директивой . -r.return(код[, строка]) +r.return(код[, строка]) отправляет клиенту полный ответ с указанным кодом @@ -254,22 +254,22 @@ r.rawHeadersIn.filter(v=>v[0].toLowerCas -r.send(строка) +r.send(строка) отправляет часть тела ответа клиенту -r.sendHeader() +r.sendHeader() отправляет заголовки HTTP клиенту -r.status +r.status статус, доступно для записи -r.subrequest(uri[, +r.subrequest(uri[, options[, callback]]) создаёт подзапрос с заданными uri и @@ -339,7 +339,7 @@ r.rawHeadersIn.filter(v=>v[0].toLowerCas (начиная с версии 0.2.8) -r.warn(строка) +r.warn(строка) записывает строку в лог-файл ошибок на уровне лога warning @@ -389,13 +389,13 @@ r.rawHeadersIn.filter(v=>v[0].toLowerCas (0.2.4). -s.error(строка) +s.error(строка) записывает отправленную строку в лог-файл ошибок на уровне лога error -s.log(строка) +s.log(строка) записывает отправленную строку в лог-файл ошибок на уровне лога info @@ -447,7 +447,7 @@ true, если данные являются последним буфером. -s.remoteAddress +s.remoteAddress адрес клиента, только чтение @@ -486,7 +486,7 @@ true, если буфер должен иметь флаг flush (начиная с версии 0.2.8) -s.warn(строка) +s.warn(строка) записывает отправленную строку в лог-файл ошибок на уровне лога warning @@ -640,7 +640,7 @@ TypeError: argument must be a byte strin Возвращает null, если в строке найден символ больше, чем 255. -String.prototype.toString([кодировка]) +String.prototype.toString([кодировка]) Если кодировка не указана,