- The module name is now also output as an HTML header.

- Agreed that examples can only contain literal text.
- Agreed to call modules "ngx_*_module".
- Renamed XML element "http-error" to a more general "http-status".
- Fixed text of error codes to match the actual code.
This commit is contained in:
Ruslan Ermilov 2011-09-15 08:24:33 +00:00
parent c940f5fc99
commit 2a46092c5a
5 changed files with 41 additions and 39 deletions

View File

@ -24,7 +24,7 @@
<!ELEMENT context (#PCDATA)* > <!ELEMENT context (#PCDATA)* >
<!ELEMENT para (#PCDATA | argument | c-def | c-func | code | command | <!ELEMENT para (#PCDATA | argument | c-def | c-func | code | command |
dq | emphasis | example | header | http-error | link | dq | emphasis | example | header | http-status | link |
list | note | parameter | pathname | value | var)* > list | note | parameter | pathname | value | var)* >
<!ELEMENT argument (#PCDATA)* > <!ELEMENT argument (#PCDATA)* >
@ -41,12 +41,12 @@
<!ELEMENT emphasis (#PCDATA)* > <!ELEMENT emphasis (#PCDATA)* >
<!ELEMENT example ANY > <!ELEMENT example (#PCDATA)* >
<!ELEMENT header (#PCDATA | argument)* > <!ELEMENT header (#PCDATA | argument)* >
<!ELEMENT http-error EMPTY > <!ELEMENT http-status EMPTY >
<!ATTLIST http-error <!ATTLIST http-status
code CDATA #REQUIRED code CDATA #REQUIRED
text CDATA #IMPLIED text CDATA #IMPLIED
> >

View File

@ -202,8 +202,8 @@ This directive can be used during debugging, or when using the
<var>$request_body_file</var> <var>$request_body_file</var>
variable, or the variable, or the
<link doc="ngx_http_perl_module.xml" id="methods">$r->request_body_file</link> <link doc="ngx_http_perl_module.xml" id="methods">$r->request_body_file</link>
method of the method of the module
<link doc="ngx_http_perl_module.xml">http_perl</link> module. <link doc="ngx_http_perl_module.xml">ngx_http_perl_module</link>.
</para> </para>
<para> <para>
@ -300,8 +300,8 @@ Defines a timeout for reading client request body.
A timeout is only set between two successive read operations, A timeout is only set between two successive read operations,
not for the transmission of the whole request body. not for the transmission of the whole request body.
If a client does not transmit anything within this time, If a client does not transmit anything within this time,
the error the client error
<http-error code="408" text="Request time out"/> <http-status code="408" text="Request Time-out"/>
is returned. is returned.
</para> </para>
@ -337,8 +337,8 @@ directive.
<para> <para>
Defines a timeout for reading client request header. Defines a timeout for reading client request header.
If a client does not transmit the entire header within this time, If a client does not transmit the entire header within this time,
the error the client error
<http-error code="408" text="Request time out"/> <http-status code="408" text="Request Time-out"/>
is returned. is returned.
</para> </para>
@ -357,9 +357,9 @@ Sets the maximum allowed size of the client request body,
specified in the specified in the
<header>Content-Length</header> <header>Content-Length</header>
request header field. request header field.
If <argument>size</argument> is greater than the configured value, the If it exceeds the configured value, the client error
<http-error code="413" text="Request Entity Too Large"/> <http-status code="413" text="Request Entity Too Large"/>
error is returned to a client. is returned.
Please be aware that Please be aware that
<link doc="/web/upload.xml">browsers cannot correctly display <link doc="/web/upload.xml">browsers cannot correctly display
this error</link>. this error</link>.
@ -539,8 +539,9 @@ request header.
<para> <para>
Specifies that a given location can only be used for internal requests. Specifies that a given location can only be used for internal requests.
For external requests, the <http-error code="404" text="Not found"/> For external requests, the client error
error is returned. <http-status code="404" text="Not Found"/>
is returned.
Internal requests are the following: Internal requests are the following:
<list type="bullet"> <list type="bullet">
@ -552,15 +553,15 @@ requests redirected by the <link id="error_page">error_page</link> directive;
<listitem> <listitem>
subrequests formed by the subrequests formed by the
<command>include virtual</command> <command>include virtual</command>
command of the command of the module
<link doc="ngx_http_ssi_module.xml">http_ssi</link> module; <link doc="ngx_http_ssi_module.xml">ngx_http_ssi_module</link>;
</listitem> </listitem>
<listitem> <listitem>
requests changed by the requests changed by the
<link doc="ngx_http_rewrite_module.xml" id="rewrite">rewrite</link> <link doc="ngx_http_rewrite_module.xml" id="rewrite">rewrite</link>
directive of the directive of the module
<link doc="ngx_http_rewrite_module.xml">http_rewrite</link> module. <link doc="ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link>.
</listitem> </listitem>
</list> </list>
@ -633,12 +634,13 @@ MSIE will close keep-alive connection in about 60 seconds.
<para> <para>
Sets the maximum <argument>number</argument> and <argument>size</argument> of Sets the maximum <argument>number</argument> and <argument>size</argument> of
buffers used when reading large client request headers. buffers used when reading large client request headers.
A request line cannot exceed the size of one buffer, or the A request line cannot exceed the size of one buffer, or the client error
<http-error code="414" text="Request URI too large"/> <http-status code="414" text="Request-URI Too Large"/>
error is returned. is returned.
A request header field cannot exceed the size of one buffer as well, or the A request header field cannot exceed the size of one buffer as well, or the
<http-error code="400" text="Bad request"/> client error
error is returned. <http-status code="400" text="Bad Request"/>
is returned.
Buffers are allocated only on demand. Buffers are allocated only on demand.
By default, the buffer size is equal to one memory page size. By default, the buffer size is equal to one memory page size.
It is either 4K or 8K, platform dependent. It is either 4K or 8K, platform dependent.
@ -658,9 +660,9 @@ into the keep-alive state, these buffers are freed.
Limits allowed HTTP methods inside a location. Limits allowed HTTP methods inside a location.
The GET method also implies the HEAD method. The GET method also implies the HEAD method.
Access to other methods can be limited using the Access to other methods can be limited using the
<link doc="ngx_http_access_module.xml">http_access</link> <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
and and
<link doc="ngx_http_auth_basic_module.xml">http_auth_basic</link> <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
modules directives: modules directives:
<example> <example>
limit_except GET { limit_except GET {
@ -1477,8 +1479,8 @@ If a URI need to be modified, the
<para> <para>
Allows access if any of the Allows access if any of the
<link doc="ngx_http_access_module.xml">http_access</link> <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
or <link doc="ngx_http_auth_basic_module.xml">http_auth_basic</link> or <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
modules grant access. modules grant access.
<example> <example>
location / { location / {
@ -1985,8 +1987,8 @@ Enables or disables the use of underscores in client request header fields.
<section id="variables" name="Embedded Variables"> <section id="variables" name="Embedded Variables">
<para> <para>
The http_core module supports embedded variables with names matching The module <code>ngx_http_core_module</code> supports embedded variables with
those of the Apache Server. names matching those of the Apache Server.
First of all, these are variables representing client request header First of all, these are variables representing client request header
fields, such as, <var>$http_user_agent</var>, <var>$http_cookie</var>, fields, such as, <var>$http_user_agent</var>, <var>$http_cookie</var>,
and so on. and so on.

View File

@ -4,7 +4,7 @@
<module name="Core Module" id="core_module"> <module name="Core Module" id="core_module">
<section name="Example Configuration" id="example"> <section id="example" name="Example Configuration">
<para> <para>
<example> <example>
@ -25,7 +25,7 @@ events {
</section> </section>
<section name="Directives" id="directives"> <section id="directives" name="Directives">
<directive name="daemon"> <directive name="daemon">
<syntax>daemon <value>on</value> | <value>off</value></syntax> <syntax>daemon <value>on</value> | <value>off</value></syntax>
@ -57,9 +57,8 @@ of an executable file;
</listitem> </listitem>
<listitem> <listitem>
use of variables by the use of variables by the module
<link doc="http/ngx_http_perl_module.xml">http_perl</link> <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>;
module;
</listitem> </listitem>
<listitem> <listitem>
@ -77,9 +76,9 @@ of an executable file.
</para> </para>
<para> <para>
The TZ variable is always inherited and made available to the The TZ variable is always inherited and made available to the module
<link doc="http/ngx_http_perl_module.xml">http_perl</link> <link doc="http/ngx_http_perl_module.xml">ngx_http_perl_module</link>,
module, unless configured explicitly. unless configured explicitly.
</para> </para>
<para> <para>

View File

@ -34,7 +34,7 @@ X:stylesheet {
X:template = "header" { <code> !!; </code> } X:template = "header" { <code> !!; </code> }
X:template = "http-error" { X:template = "http-status" {
!{@code} X:text{ (} !{@text} X:text{)} !{@code} X:text{ (} !{@text} X:text{)}
} }

View File

@ -24,6 +24,7 @@ X:template = "/module" {
</head> </head>
<body> <body>
<center><h3> !{@name} </h3></center>
!!; !!;
</body> </body>