]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_reqtimeout.xml
automatically replace LastChangedRevision
[apache] / docs / manual / mod / mod_reqtimeout.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_reqtimeout.xml.meta">
24
25 <name>mod_reqtimeout</name>
26 <description>Set timeout and minimum data rate for receiving requests
27 </description>
28 <status>Experimental</status>
29 <sourcefile>mod_reqtimeout.c</sourcefile>
30 <identifier>reqtimeout_module</identifier>
31 <compatibility>Available in Apache 2.3 and later</compatibility>
32
33 <section id="examples"><title>Examples</title>
34
35     <ol>
36       <li>
37         Allow 10 seconds to receive the request including the headers and
38         30 seconds for receiving the request body:
39
40         <example>
41           RequestTimeout headerinit=10 bodyinit=30
42         </example>
43       </li>
44
45       <li>
46         Allow at least 10 seconds to receive the request including the headers.
47         If the client sends data, increase the timeout by 1 second for every
48         500 bytes received. But do not allow more than 30 seconds for the
49         request including the headers:
50
51         <example>
52           RequestTimeout headerinit=10 headerminrate=500 headermax=30
53         </example>
54       </li>
55
56       <li>
57         Allow at least 10 seconds to receive the request body.
58         If the client sends data, increase the timeout by 1 second for every
59         1000 bytes received, with no upper limit for the timeout (exept for
60         the limit given indirectly by
61         <directive module="core">LimitRequestBody</directive>):
62
63         <example>
64           RequestTimeout bodyinit=10 bodyminrate=1000
65         </example>
66       </li>
67
68     </ol>
69 </section>
70
71 <directivesynopsis>
72 <name>RequestTimeout</name>
73 <description>Set timeout values for receiving request headers and body from client.
74 </description>
75 <syntax>RequestTimeout
76 [headerinit=<var>time</var>
77 [headerminrate=<var>rate</var> [headermax=<var>time</var>]]]
78 [bodyinit=<var>time</var>
79 [bodyminrate=<var>rate</var> [bodymax=<var>time</var>]]]
80 </syntax>
81 <default>Unset; all values 0</default>
82 <contextlist><context>server config</context><context>virtual host</context>
83 </contextlist>
84
85 <usage>
86     <p>This directive can set various timeouts for receiving the request headers
87     and the request body from the client. If the client fails to send headers or
88     body within the configured time, a <code>408 REQUEST TIME OUT</code> error
89     is sent.</p>
90
91     <p>For SSL virtual hosts, the header timeout values include the time needed
92     to do the initial SSL handshake. The body timeout values include the time
93     needed for SSL renegotiation (if necessary).</p>
94
95     <p>When an <directive module="core">AcceptFilter</directive> is in use
96     (usually the case on Linux and FreeBSD), the socket is not sent to the
97     server process before at least one byte (or the whole request for
98     <code>httpready</code>) is received. The header timeout configured with
99     <code>RequestTimeout</code> is only effective after the server process has
100     received the socket.</p>
101
102     <p>For the timeout parameters, the value 0 means no limit.</p>
103
104     <dl>
105
106     <dt><code>headerinit</code></dt>
107     <dd>The initial timeout for receiving the request headers in seconds. 
108     Also the timout for receiving the first byte of the request. If
109     <code>headerminrate</code> is not set, the request line and all headers
110     must be received within this time.</dd>
111
112     <dt><code>headerminrate</code></dt>
113     <dd>The minumum data rate for receiving the request headers in
114     bytes/second. Whenever data is received, the timeout is increased
115     according to this data rate.</dd>
116
117     <dt><code>headermax</code></dt>
118     <dd>The maximum timeout for receiving the request headers in seconds.
119     The timeout cannot be increased above this value by
120     <code>headerminrate</code>.</dd>
121
122     <dt><code>bodyinit</code></dt>
123     <dd>The initial timeout for receiving the request body in seconds. 
124     Also the timout for receiving the first byte of the request body. If
125     <code>bodyminrate</code> is not set, the complete request body must be
126     received within this time.</dd>
127
128     <dt><code>bodyminrate</code></dt>
129     <dd>The minumum data rate for receiving the request body in
130     bytes/second. Whenever data is received, the timeout is increased
131     according to this data rate.</dd>
132
133     <dt><code>bodymax</code></dt>
134     <dd>The maximum timeout for receiving the request body in seconds.
135     The timeout cannot be increased above this value by
136     <code>bodyminrate</code></dd>
137
138     </dl>
139
140 </usage>
141
142 </directivesynopsis>
143
144 </modulesynopsis>