changeset 1374:90922e31756d

Documented the autoindex_format directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 16 Dec 2014 17:22:42 +0300
parents 47e19b6d3dbc
children ab0ebdd7ddac
files xml/en/docs/http/ngx_http_autoindex_module.xml xml/ru/docs/http/ngx_http_autoindex_module.xml
diffstat 2 files changed, 62 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_autoindex_module.xml
+++ b/xml/en/docs/http/ngx_http_autoindex_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_autoindex_module"
         link="/en/docs/http/ngx_http_autoindex_module.html"
         lang="en"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -64,13 +64,40 @@ Enables or disables the directory listin
 <context>location</context>
 
 <para>
-Specifies whether exact file sizes should be output in the directory listing,
+For the HTML <link id="autoindex_format">format</link>,
+specifies whether exact file sizes should be output in the directory listing,
 or rather rounded to kilobytes, megabytes, and gigabytes.
 </para>
 
 </directive>
 
 
+<directive name="autoindex_format">
+<syntax>
+    <literal>html</literal> |
+    <literal>xml</literal> |
+    <literal>json</literal> |
+    <literal>jsonp</literal></syntax>
+<default>html</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.7.9</appeared-in>
+
+<para>
+Sets the format of a directory listing.
+</para>
+
+<para>
+When the JSONP format is used, the name of a callback function is set
+with the <literal>callback</literal> request argument.
+If the argument is missing or has an empty value,
+then the JSON format is used.
+</para>
+
+</directive>
+
+
 <directive name="autoindex_localtime">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>off</default>
@@ -79,7 +106,8 @@ or rather rounded to kilobytes, megabyte
 <context>location</context>
 
 <para>
-Specifies whether times in the directory listing should be
+For the HTML <link id="autoindex_format">format</link>,
+specifies whether times in the directory listing should be
 output in the local time zone or UTC.
 </para>
 
--- a/xml/ru/docs/http/ngx_http_autoindex_module.xml
+++ b/xml/ru/docs/http/ngx_http_autoindex_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_autoindex_module"
         link="/ru/docs/http/ngx_http_autoindex_module.html"
         lang="ru"
-        rev="2">
+        rev="3">
 
 <section id="summary">
 
@@ -62,13 +62,40 @@ location / {
 <context>location</context>
 
 <para>
-Определяет, как выводить размеры файлов в листинге
+Для <link id="autoindex_format">формата</link> HTML
+определяет, как выводить размеры файлов в листинге
 каталога: точно или округляя до килобайт, мегабайт и гигабайт.
 </para>
 
 </directive>
 
 
+<directive name="autoindex_format">
+<syntax>
+    <literal>html</literal> |
+    <literal>xml</literal> |
+    <literal>json</literal> |
+    <literal>jsonp</literal></syntax>
+<default>html</default>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+<appeared-in>1.7.9</appeared-in>
+
+<para>
+Задаёт формат вывода листинга каталога.
+</para>
+
+<para>
+При использовании формата JSONP имя callback-функции
+задаётся в аргументе запроса <literal>callback</literal>.
+Если аргумент отсутствует или имеет пустое значение,
+то используется формат JSON.
+</para>
+
+</directive>
+
+
 <directive name="autoindex_localtime">
 <syntax><literal>on</literal> | <literal>off</literal></syntax>
 <default>off</default>
@@ -77,7 +104,8 @@ location / {
 <context>location</context>
 
 <para>
-Определяет, в какой временной зоне выводить время в листинге
+Для <link id="autoindex_format">формата</link> HTML
+определяет, в какой временной зоне выводить время в листинге
 каталога: в локальной или в UTC.
 </para>