]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_proxy_ajp.xml
xforms
[apache] / docs / manual / mod / mod_proxy_ajp.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_proxy_ajp.xml.meta">
24
25 <name>mod_proxy_ajp</name>
26 <description>AJP support module for
27 <module>mod_proxy</module></description>
28 <status>Extension</status>
29 <sourcefile>mod_proxy_ajp.c</sourcefile>
30 <identifier>proxy_ajp_module</identifier>
31 <compatibility>Available in version 2.1 and later</compatibility>
32
33 <summary>
34     <p>This module <em>requires</em> the service of <module
35     >mod_proxy</module>. It provides support for the
36     <code>Apache JServ Protocol version 1.3</code> (hereafter
37     <em>AJP13</em>).</p>
38
39     <p>Thus, in order to get the ability of handling <code>AJP13</code>
40     protocol, <module>mod_proxy</module> and
41     <module>mod_proxy_ajp</module> have to be present in the server.</p>
42
43     <note type="warning"><title>Warning</title>
44       <p>Do not enable proxying until you have <a
45       href="mod_proxy.html#access">secured your server</a>. Open proxy
46       servers are dangerous both to your network and to the Internet at
47       large.</p>
48     </note>
49 </summary>
50
51 <seealso><module>mod_proxy</module></seealso>
52 <seealso><a href="../env.html">Environment Variable documentation</a></seealso>
53
54 <section id="usage"><title>Usage</title>
55     <p>This module is used to reverse proxy to a backend application server
56     (e.g. Apache Tomcat) using the AJP13 protocol. The usage is similar to
57     an HTTP reverse proxy, but uses the <code>ajp://</code> prefix:</p>
58
59     <example><title>Simple Reverse Proxy</title>
60     <highlight language="config">
61     ProxyPass /app ajp://backend.example.com:8009/app
62     </highlight>
63     </example>
64
65     <p>Balancers may also be used:</p>
66     <example><title>Balancer Reverse Proxy</title>
67     <highlight language="config">
68 &lt;Proxy balancer://cluster&gt;
69     BalancerMember ajp://app1.example.com:8009 loadfactor=1
70     BalancerMember ajp://app2.example.com:8009 loadfactor=2
71     ProxySet lbmethod=bytraffic
72 &lt;/Proxy&gt;
73 ProxyPass /app balancer://cluster/app
74       </highlight>
75     </example>
76
77     <p>Note that usually no
78     <directive module="mod_proxy">ProxyPassReverse</directive>
79     directive is necessary. The AJP request includes the original host
80     header given to the proxy, and the application server can be expected
81     to generate self-referential headers relative to this host, so no
82     rewriting is necessary.</p>
83     
84     <p>The main exception is when the URL path on the proxy differs from that
85     on the
86     backend. In this case, a redirect header can be rewritten relative to the
87     original host URL (not the backend <code>ajp://</code> URL), for
88     example:</p>
89     <example><title>Rewriting Proxied Path</title>
90     <highlight language="config">
91 ProxyPass /apps/foo ajp://backend.example.com:8009/foo
92 ProxyPassReverse /apps/foo http://www.example.com/foo
93     </highlight>
94     </example>
95     <p>However, it is usually better to deploy the application on the backend
96     server at the same path as the proxy rather than to take this approach.
97     </p>
98 </section>
99
100 <section id="env"><title>Environment Variables</title>
101     <p>Environment variables whose names have the prefix <code>AJP_</code>
102     are forwarded to the origin server as AJP request attributes
103     (with the AJP_ prefix removed from the name of the key).</p>
104 </section>
105
106 <section id="overviewprotocol"><title>Overview of the protocol</title>
107     <p>The <code>AJP13</code> protocol is packet-oriented.  A binary format
108     was presumably chosen over the more readable plain text for reasons of
109     performance.  The web server communicates with the servlet container over
110     TCP connections.  To cut down on the expensive process of socket creation,
111     the web server will attempt to maintain persistent TCP connections to the
112     servlet container, and to reuse a connection for multiple request/response
113     cycles.</p>
114     <p>Once a connection is assigned to a particular request, it will not be
115     used for any others until the request-handling cycle has terminated.  In
116     other words, requests are not multiplexed over connections.  This makes
117     for much simpler code at either end of the connection, although it does
118     cause more connections to be open at once.</p>
119     <p>Once the web server has opened a connection to the servlet container,
120     the connection can be in one of the following states:</p>
121     <ul>
122     <li> Idle <br/> No request is being handled over this connection. </li>
123     <li> Assigned <br/> The connection is handling a specific request.</li>
124     </ul>
125     <p>Once a connection is assigned to handle a particular request, the basic
126     request information (e.g. HTTP headers, etc) is sent over the connection in
127     a highly condensed form (e.g. common strings are encoded as integers).
128     Details of that format are below in Request Packet Structure. If there is a
129     body to the request <code>(content-length > 0)</code>, that is sent in a
130     separate packet immediately after.</p>
131     <p>At this point, the servlet container is presumably ready to start
132     processing the request.  As it does so, it can send the
133     following messages back to the web server:</p>
134     <ul>
135     <li>SEND_HEADERS <br/>Send a set of headers back to the browser.</li>
136     <li>SEND_BODY_CHUNK <br/>Send a chunk of body data back to the browser.
137     </li>
138     <li>GET_BODY_CHUNK <br/>Get further data from the request if it hasn't all
139     been transferred yet.  This is necessary because the packets have a fixed
140     maximum size and arbitrary amounts of data can be included the body of a
141     request (for uploaded files, for example).  (Note: this is unrelated to
142     HTTP chunked transfer).</li>
143     <li>END_RESPONSE <br/> Finish the request-handling cycle.</li>
144     </ul>
145     <p>Each message is accompanied by a differently formatted packet of data.
146     See Response Packet Structures below for details.</p>
147 </section>
148
149 <section id="basppacketstruct"><title>Basic Packet Structure</title>
150     <p>There is a bit of an XDR heritage to this protocol, but it differs
151     in lots of ways (no 4 byte alignment, for example).</p>
152     <p>Byte order: I am not clear about the endian-ness of the individual
153     bytes.  I'm guessing the bytes are little-endian, because that's what
154     XDR specifies, and I'm guessing that sys/socket library is magically
155     making that so (on the C side).  If anyone with a better knowledge of
156     socket calls can step in, that would be great.</p>
157     <p>There are four data types in the protocol: bytes, booleans,
158     integers and strings.</p>
159     <dl>
160     <dt><strong>Byte</strong></dt><dd>A single byte.</dd>
161     <dt><strong>Boolean</strong></dt>
162       <dd>A single byte, <code>1 = true</code>, <code>0 = false</code>.
163       Using other non-zero values as true (i.e. C-style) may work in some places,
164       but it won't in others.</dd>
165     <dt><strong>Integer</strong></dt>
166       <dd>A number in the range of <code>0 to 2^16 (32768)</code>.  Stored in
167       2 bytes with the high-order byte first.</dd>
168     <dt><strong>String</strong></dt>
169       <dd>A variable-sized string (length bounded by 2^16). Encoded with
170       the length packed into two bytes first, followed by the string
171       (including the terminating '\0').  Note that the encoded length does
172       <strong>not</strong> include the trailing '\0' -- it is like
173       <code>strlen</code>.  This is a touch confusing on the Java side, which
174       is littered with odd autoincrement statements to skip over these
175       terminators.  I believe the reason this was done was to allow the C
176       code to be extra efficient when reading strings which the servlet
177       container is sending back -- with the terminating \0 character, the
178       C code can pass around references into a single buffer, without copying.
179       if the \0 was missing, the C code would have to copy things out in order
180       to get its notion of a string.</dd>
181     </dl>
182
183   <section><title>Packet Size</title>
184     <p>According to much of the code, the max packet size is <code>
185     8 * 1024 bytes (8K)</code>.  The actual length of the packet is encoded in
186     the header.</p>
187   </section>
188   <section><title>Packet Headers</title>
189     <p>Packets sent from the server to the container begin with
190     <code>0x1234</code>.  Packets sent from the container to the server
191     begin with <code>AB</code> (that's the ASCII code for A followed by the
192     ASCII code for B).  After those first two bytes, there is an integer
193     (encoded as above) with the length of the payload.  Although this might
194     suggest that the maximum payload could be as large as 2^16, in fact, the
195     code sets the maximum to be 8K.</p>
196     <table>
197       <tr>
198         <td colspan="6"><em>Packet Format (Server->Container)</em></td>
199       </tr>
200       <tr>
201         <td>Byte</td>
202         <td>0</td>
203         <td>1</td>
204         <td>2</td>
205         <td>3</td>
206         <td>4...(n+3)</td>
207       </tr>
208       <tr>
209         <td>Contents</td>
210         <td>0x12</td>
211         <td>0x34</td>
212         <td colspan="2">Data Length (n)</td>
213         <td>Data</td>
214       </tr>
215     </table>
216     <table>
217       <tr>
218         <td colspan="6"><em>Packet Format (Container->Server)</em></td>
219       </tr>
220       <tr>
221         <td>Byte</td>
222         <td>0</td>
223         <td>1</td>
224         <td>2</td>
225         <td>3</td>
226         <td>4...(n+3)</td>
227       </tr>
228       <tr>
229         <td>Contents</td>
230         <td>A</td>
231         <td>B</td>
232         <td colspan="2">Data Length (n)</td>
233         <td>Data</td>
234       </tr>
235     </table>
236     <p>For most packets, the first byte of the payload encodes the type of
237      message.  The exception is for request body packets sent from the server to
238      the container -- they are sent with a standard packet header (<code>
239      0x1234</code> and then length of the packet), but without any prefix code
240      after that.</p>
241      <p>The web server can send the following messages to the servlet
242      container:</p>
243     <table>
244       <tr>
245         <td>Code</td>
246         <td>Type of Packet</td>
247         <td>Meaning</td>
248       </tr>
249       <tr>
250         <td>2</td>
251         <td>Forward Request</td>
252         <td>Begin the request-processing cycle with the following data</td>
253       </tr>
254       <tr>
255         <td>7</td>
256         <td>Shutdown</td>
257         <td>The web server asks the container to shut itself down.</td>
258       </tr>
259       <tr>
260         <td>8</td>
261         <td>Ping</td>
262         <td>The web server asks the container to take control
263         (secure login phase).</td>
264       </tr>
265       <tr>
266         <td>10</td>
267         <td>CPing</td>
268         <td>The web server asks the container to respond quickly with a CPong.
269         </td>
270       </tr>
271       <tr>
272         <td>none</td>
273         <td>Data</td>
274         <td>Size (2 bytes) and corresponding body data.</td>
275       </tr>
276     </table>
277     <p>To ensure some basic security, the container will only actually do the
278     <code>Shutdown</code> if the request comes from the same machine on which
279     it's hosted.</p>
280     <p>The first <code>Data</code> packet is send immediately after the
281     <code>Forward Request</code> by the web server.</p>
282     <p>The servlet container can send the following types of messages to the
283     webserver:</p>
284     <table>
285       <tr>
286         <td>Code</td>
287         <td>Type of Packet</td>
288         <td>Meaning</td>
289       </tr>
290       <tr>
291         <td>3</td>
292         <td>Send Body Chunk</td>
293         <td>Send a chunk of the body from the servlet container to the web
294         server (and presumably, onto the browser). </td>
295       </tr>
296       <tr>
297         <td>4</td>
298         <td>Send Headers</td>
299         <td>Send the response headers from the servlet container to the web
300         server (and presumably, onto the browser).</td>
301       </tr>
302       <tr>
303         <td>5</td>
304         <td>End Response</td>
305         <td>Marks the end of the response (and thus the request-handling cycle).
306         </td>
307       </tr>
308       <tr>
309         <td>6</td>
310         <td>Get Body Chunk</td>
311         <td>Get further data from the request if it hasn't all been
312         transferred yet.</td>
313       </tr>
314       <tr>
315         <td>9</td>
316         <td>CPong Reply</td>
317         <td>The reply to a CPing request</td>
318       </tr>
319     </table>
320     <p>Each of the above messages has a different internal structure, detailed
321     below.</p>
322   </section>
323 </section>
324 <section id="rpacetstruct"><title>Request Packet Structure</title>
325     <p>For messages from the server to the container of type
326     <em>Forward Request</em>:</p>
327     <example><pre>
328 AJP13_FORWARD_REQUEST :=
329     prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
330     method           (byte)
331     protocol         (string)
332     req_uri          (string)
333     remote_addr      (string)
334     remote_host      (string)
335     server_name      (string)
336     server_port      (integer)
337     is_ssl           (boolean)
338     num_headers      (integer)
339     request_headers *(req_header_name req_header_value)
340     attributes      *(attribut_name attribute_value)
341     request_terminator (byte) OxFF
342     </pre></example>
343     <p>The <code>request_headers</code> have the following structure:
344     </p><example><pre>
345 req_header_name :=
346     sc_req_header_name | (string)  [see below for how this is parsed]
347
348 sc_req_header_name := 0xA0xx (integer)
349
350 req_header_value := (string)
351 </pre></example>
352     <p>The <code>attributes</code> are optional and have the following
353     structure:</p>
354     <example><pre>
355 attribute_name := sc_a_name | (sc_a_req_attribute string)
356
357 attribute_value := (string)
358
359     </pre></example>
360     <p>Not that the all-important header is <code>content-length</code>,
361     because it determines whether or not the container looks for another
362     packet immediately.</p>
363   <section><title>Detailed description of the elements of Forward Request
364   </title></section>
365   <section><title>Request prefix</title>
366     <p>For all requests, this will be 2. See above for details on other Prefix
367     codes.</p>
368   </section>
369   <section><title>Method</title>
370     <p>The HTTP method, encoded as a single byte:</p>
371     <table>
372       <tr><td>Command Name</td><td>Code</td></tr>
373       <tr><td>OPTIONS</td><td>1</td></tr>
374       <tr><td>GET</td><td>2</td></tr>
375       <tr><td>HEAD</td><td>3</td></tr>
376       <tr><td>POST</td><td>4</td></tr>
377       <tr><td>PUT</td><td>5</td></tr>
378       <tr><td>DELETE</td><td>6</td></tr>
379       <tr><td>TRACE</td><td>7</td></tr>
380       <tr><td>PROPFIND</td><td>8</td></tr>
381       <tr><td>PROPPATCH</td><td>9</td></tr>
382       <tr><td>MKCOL</td><td>10</td></tr>
383       <tr><td>COPY</td><td>11</td></tr>
384       <tr><td>MOVE</td><td>12</td></tr>
385       <tr><td>LOCK</td><td>13</td></tr>
386       <tr><td>UNLOCK</td><td>14</td></tr>
387       <tr><td>ACL</td><td>15</td></tr>
388       <tr><td>REPORT</td><td>16</td></tr>
389       <tr><td>VERSION-CONTROL</td><td>17</td></tr>
390       <tr><td>CHECKIN</td><td>18</td></tr>
391       <tr><td>CHECKOUT</td><td>19</td></tr>
392       <tr><td>UNCHECKOUT</td><td>20</td></tr>
393       <tr><td>SEARCH</td><td>21</td></tr>
394       <tr><td>MKWORKSPACE</td><td>22</td></tr>
395       <tr><td>UPDATE</td><td>23</td></tr>
396       <tr><td>LABEL</td><td>24</td></tr>
397       <tr><td>MERGE</td><td>25</td></tr>
398       <tr><td>BASELINE_CONTROL</td><td>26</td></tr>
399       <tr><td>MKACTIVITY</td><td>27</td></tr>
400     </table>
401     <p>Later version of ajp13, will transport
402     additional methods, even if they are not in this list.</p>
403   </section>
404   <section><title>protocol, req_uri, remote_addr, remote_host, server_name,
405   server_port, is_ssl</title>
406     <p>These are all fairly self-explanatory.  Each of these is required, and
407     will be sent for every request.</p>
408   </section>
409   <section><title>Headers</title>
410     <p>The structure of <code>request_headers</code> is the following:
411     First, the number of headers <code>num_headers</code> is encoded.
412     Then, a series of header name <code>req_header_name</code> / value
413     <code>req_header_value</code> pairs follows.
414     Common header names are encoded as integers,
415     to save space.  If the header name is not in the list of basic headers,
416     it is encoded normally (as a string, with prefixed length).  The list of
417     common headers <code>sc_req_header_name</code>and their codes
418     is as follows (all are case-sensitive):</p>
419     <table>
420       <tr><td>Name</td><td>Code value</td><td>Code name</td></tr>
421       <tr><td>accept</td><td>0xA001</td><td>SC_REQ_ACCEPT</td></tr>
422       <tr><td>accept-charset</td><td>0xA002</td><td>SC_REQ_ACCEPT_CHARSET
423       </td></tr>
424       <tr><td>accept-encoding</td><td>0xA003</td><td>SC_REQ_ACCEPT_ENCODING
425       </td></tr>
426       <tr><td>accept-language</td><td>0xA004</td><td>SC_REQ_ACCEPT_LANGUAGE
427       </td></tr>
428       <tr><td>authorization</td><td>0xA005</td><td>SC_REQ_AUTHORIZATION</td>
429       </tr>
430       <tr><td>connection</td><td>0xA006</td><td>SC_REQ_CONNECTION</td></tr>
431       <tr><td>content-type</td><td>0xA007</td><td>SC_REQ_CONTENT_TYPE</td>
432       </tr>
433       <tr><td>content-length</td><td>0xA008</td><td>SC_REQ_CONTENT_LENGTH</td>
434       </tr>
435       <tr><td>cookie</td><td>0xA009</td><td>SC_REQ_COOKIE</td></tr>
436       <tr><td>cookie2</td><td>0xA00A</td><td>SC_REQ_COOKIE2</td></tr>
437       <tr><td>host</td><td>0xA00B</td><td>SC_REQ_HOST</td></tr>
438       <tr><td>pragma</td><td>0xA00C</td><td>SC_REQ_PRAGMA</td></tr>
439       <tr><td>referer</td><td>0xA00D</td><td>SC_REQ_REFERER</td></tr>
440       <tr><td>user-agent</td><td>0xA00E</td><td>SC_REQ_USER_AGENT</td></tr>
441     </table>
442     <p>The Java code that reads this grabs the first two-byte integer and if
443     it sees an <code>'0xA0'</code> in the most significant
444     byte, it uses the integer in the second byte as an index into an array of
445     header names.  If the first byte is not <code>0xA0</code>, it assumes that
446     the two-byte integer is the length of a string, which is then read in.</p>
447     <p>This works on the assumption that no header names will have length
448     greater than <code>0x9999 (==0xA000 - 1)</code>, which is perfectly
449     reasonable, though somewhat arbitrary.</p>
450     <note><title>Note:</title>
451     The <code>content-length</code> header is extremely
452     important.  If it is present and non-zero, the container assumes that
453     the request has a body (a POST request, for example), and immediately
454     reads a separate packet off the input stream to get that body.
455     </note>
456   </section>
457   <section><title>Attributes</title>
458     <p>The attributes prefixed with a <code>?</code>
459     (e.g. <code>?context</code>) are all optional.  For each, there is a
460     single byte code to indicate the type of attribute, and then its value
461     (string or integer).  They can be sent in any order (though the C code
462     always sends them in the order listed below).  A special terminating code
463     is sent to signal the end of the list of optional attributes. The list of
464     byte codes is:</p>
465     <table>
466       <tr><td>Information</td><td>Code Value</td><td>Type Of Value</td><td>Note</td></tr>
467       <tr><td>?context</td><td>0x01</td><td>-</td><td>Not currently implemented
468       </td></tr>
469       <tr><td>?servlet_path</td><td>0x02</td><td>-</td><td>Not currently implemented
470       </td></tr>
471       <tr><td>?remote_user</td><td>0x03</td><td>String</td><td></td></tr>
472       <tr><td>?auth_type</td><td>0x04</td><td>String</td><td></td></tr>
473       <tr><td>?query_string</td><td>0x05</td><td>String</td><td></td></tr>
474       <tr><td>?jvm_route</td><td>0x06</td><td>String</td><td></td></tr>
475       <tr><td>?ssl_cert</td><td>0x07</td><td>String</td><td></td></tr>
476       <tr><td>?ssl_cipher</td><td>0x08</td><td>String</td><td></td></tr>
477       <tr><td>?ssl_session</td><td>0x09</td><td>String</td><td></td></tr>
478       <tr><td>?req_attribute</td><td>0x0A</td><td>String</td><td>Name (the name of the
479       attribute follows)</td></tr>
480       <tr><td>?ssl_key_size</td><td>0x0B</td><td>Integer</td><td></td></tr>
481       <tr><td>are_done</td><td>0xFF</td><td>-</td><td>request_terminator</td></tr>
482     </table>
483     <p>The <code>context</code> and <code>servlet_path</code> are not
484     currently set by the C code, and most of the Java code completely ignores
485     whatever is sent over for those fields (and some of it will actually break
486     if a string is sent along after one of those codes).  I don't know if this
487     is a bug or an unimplemented feature or just vestigial code, but it's
488     missing from both sides of the connection.</p>
489     <p>The <code>remote_user</code> and <code>auth_type</code> presumably
490     refer to HTTP-level authentication, and communicate the remote user's
491     username and the type of authentication used to establish their identity
492     (e.g. Basic, Digest).</p>
493     <p>The <code>query_string</code>, <code>ssl_cert</code>,
494     <code>ssl_cipher</code>, and <code>ssl_session</code> refer to the
495     corresponding pieces of HTTP and HTTPS.</p>
496     <p>The <code>jvm_route</code>, is used to support sticky
497     sessions -- associating a user's sesson with a particular Tomcat instance
498     in the presence of multiple, load-balancing servers.</p>
499     <p>Beyond this list of basic attributes, any number of other attributes
500     can be sent via the <code>req_attribute</code> code <code>0x0A</code>.
501     A pair of strings to represent the attribute name and value are sent
502     immediately after each instance of that code.  Environment values are passed
503     in via this method.</p>
504     <p>Finally, after all the attributes have been sent, the attribute
505     terminator, <code>0xFF</code>, is sent.  This signals both the end of the
506     list of attributes and also then end of the Request Packet.</p>
507   </section>
508 </section>
509
510 <section id="resppacketstruct"><title>Response Packet Structure</title>
511     <p>for messages which the container can send back to the server.</p>
512     <example><pre>
513 AJP13_SEND_BODY_CHUNK :=
514   prefix_code   3
515   chunk_length  (integer)
516   chunk        *(byte)
517   chunk_terminator (byte) Ox00
518
519
520 AJP13_SEND_HEADERS :=
521   prefix_code       4
522   http_status_code  (integer)
523   http_status_msg   (string)
524   num_headers       (integer)
525   response_headers *(res_header_name header_value)
526
527 res_header_name :=
528     sc_res_header_name | (string)   [see below for how this is parsed]
529
530 sc_res_header_name := 0xA0 (byte)
531
532 header_value := (string)
533
534 AJP13_END_RESPONSE :=
535   prefix_code       5
536   reuse             (boolean)
537
538
539 AJP13_GET_BODY_CHUNK :=
540   prefix_code       6
541   requested_length  (integer)
542     </pre></example>
543   <section><title>Details:</title></section>
544   <section><title>Send Body Chunk</title>
545     <p>The chunk is basically binary data, and is sent directly back to the
546     browser.</p>
547   </section>
548   <section><title>Send Headers</title>
549     <p>The status code and message are the usual HTTP things
550     (e.g. <code>200</code> and <code>OK</code>). The response header names are
551     encoded the same way the request header names are. See header_encoding above
552     for details about how the codes are distinguished from the strings.<br />
553     The codes for common headers are:</p>
554     <table>
555       <tr><td>Name</td><td>Code value</td></tr>
556       <tr><td>Content-Type</td><td>0xA001</td></tr>
557       <tr><td>Content-Language</td><td>0xA002</td></tr>
558       <tr><td>Content-Length</td><td>0xA003</td></tr>
559       <tr><td>Date</td><td>0xA004</td></tr>
560       <tr><td>Last-Modified</td><td>0xA005</td></tr>
561       <tr><td>Location</td><td>0xA006</td></tr>
562       <tr><td>Set-Cookie</td><td>0xA007</td></tr>
563       <tr><td>Set-Cookie2</td><td>0xA008</td></tr>
564       <tr><td>Servlet-Engine</td><td>0xA009</td></tr>
565       <tr><td>Status</td><td>0xA00A</td></tr>
566       <tr><td>WWW-Authenticate</td><td>0xA00B</td></tr>
567     </table>
568     <p> After the code or the string header name, the header value is
569     immediately encoded.</p>
570   </section>
571   <section><title>End Response</title>
572     <p>Signals the end of this request-handling cycle.  If the
573     <code>reuse</code> flag is true <code>(==1)</code>, this TCP connection can
574     now be used to handle new incoming requests.  If <code>reuse</code> is false
575     (anything other than 1 in the actual C code), the connection should
576     be closed.</p>
577   </section>
578   <section><title>Get Body Chunk</title>
579     <p>The container asks for more data from the request (If the body was
580     too large to fit in the first packet sent over or when the request is
581     chunked). The server will send a body packet back with an amount of data
582     which is the minimum of the <code>request_length</code>, the maximum send
583     body size <code>(8186 (8 Kbytes - 6))</code>, and the number of bytes
584     actually left to send from the request body.<br/>
585     If there is no more data in the body (i.e. the servlet container is
586     trying to read past the end of the body), the server will send back an
587     <em>empty</em> packet, which is a body packet with a payload length of 0.
588     <code>(0x12,0x34,0x00,0x00)</code></p>
589   </section>
590 </section>
591
592
593 </modulesynopsis>