Author: csutherl Date: Fri Dec 14 17:45:49 2018 New Revision: 1848964 URL: http://svn.apache.org/viewvc?rev=1848964&view=rev Log: Update jk-site to reflect changes made in xdocs in r1848904
Added: tomcat/site/trunk/docs/connectors-doc/images/asf-logo.svg (with props) tomcat/site/trunk/docs/connectors-doc/images/cors-flowchart.png (with props) tomcat/site/trunk/docs/connectors-doc/images/docs-stylesheet.css tomcat/site/trunk/docs/connectors-doc/images/fonts/ tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans400.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans400italic.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans600.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans600italic.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans700.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/OpenSans700italic.woff (with props) tomcat/site/trunk/docs/connectors-doc/images/fonts/fonts.css tomcat/site/trunk/docs/connectors-doc/images/tomcat.png (with props) Removed: tomcat/site/trunk/docs/connectors-doc/style.css Modified: tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13a.html tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13ext.html tomcat/site/trunk/docs/connectors-doc/ajp/printer/ajpv13a.html tomcat/site/trunk/docs/connectors-doc/ajp/printer/ajpv13ext.html tomcat/site/trunk/docs/connectors-doc/common_howto/loadbalancers.html tomcat/site/trunk/docs/connectors-doc/common_howto/printer/loadbalancers.html tomcat/site/trunk/docs/connectors-doc/common_howto/printer/proxy.html tomcat/site/trunk/docs/connectors-doc/common_howto/printer/quick.html tomcat/site/trunk/docs/connectors-doc/common_howto/printer/timeouts.html tomcat/site/trunk/docs/connectors-doc/common_howto/printer/workers.html tomcat/site/trunk/docs/connectors-doc/common_howto/proxy.html tomcat/site/trunk/docs/connectors-doc/common_howto/quick.html tomcat/site/trunk/docs/connectors-doc/common_howto/timeouts.html tomcat/site/trunk/docs/connectors-doc/common_howto/workers.html tomcat/site/trunk/docs/connectors-doc/index.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/changelog.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/doccontrib.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/faq.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/jkstatustasks.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/printer/changelog.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/printer/doccontrib.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/printer/faq.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/printer/jkstatustasks.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/printer/reporttools.html tomcat/site/trunk/docs/connectors-doc/miscellaneous/reporttools.html tomcat/site/trunk/docs/connectors-doc/news/20041100.html tomcat/site/trunk/docs/connectors-doc/news/20050101.html tomcat/site/trunk/docs/connectors-doc/news/20060101.html tomcat/site/trunk/docs/connectors-doc/news/20070301.html tomcat/site/trunk/docs/connectors-doc/news/20081001.html tomcat/site/trunk/docs/connectors-doc/news/20090301.html tomcat/site/trunk/docs/connectors-doc/news/20100101.html tomcat/site/trunk/docs/connectors-doc/news/20110701.html tomcat/site/trunk/docs/connectors-doc/news/20120301.html tomcat/site/trunk/docs/connectors-doc/news/20140201.html tomcat/site/trunk/docs/connectors-doc/news/20150101.html tomcat/site/trunk/docs/connectors-doc/news/20160901.html tomcat/site/trunk/docs/connectors-doc/news/20180301.html tomcat/site/trunk/docs/connectors-doc/news/printer/20041100.html tomcat/site/trunk/docs/connectors-doc/news/printer/20050101.html tomcat/site/trunk/docs/connectors-doc/news/printer/20060101.html tomcat/site/trunk/docs/connectors-doc/news/printer/20070301.html tomcat/site/trunk/docs/connectors-doc/news/printer/20081001.html tomcat/site/trunk/docs/connectors-doc/news/printer/20090301.html tomcat/site/trunk/docs/connectors-doc/news/printer/20100101.html tomcat/site/trunk/docs/connectors-doc/news/printer/20110701.html tomcat/site/trunk/docs/connectors-doc/news/printer/20120301.html tomcat/site/trunk/docs/connectors-doc/news/printer/20140201.html tomcat/site/trunk/docs/connectors-doc/news/printer/20150101.html tomcat/site/trunk/docs/connectors-doc/news/printer/20160901.html tomcat/site/trunk/docs/connectors-doc/news/printer/20180301.html tomcat/site/trunk/docs/connectors-doc/printer/index.html tomcat/site/trunk/docs/connectors-doc/reference/apache.html tomcat/site/trunk/docs/connectors-doc/reference/iis.html tomcat/site/trunk/docs/connectors-doc/reference/printer/apache.html tomcat/site/trunk/docs/connectors-doc/reference/printer/iis.html tomcat/site/trunk/docs/connectors-doc/reference/printer/status.html tomcat/site/trunk/docs/connectors-doc/reference/printer/uriworkermap.html tomcat/site/trunk/docs/connectors-doc/reference/printer/workers.html tomcat/site/trunk/docs/connectors-doc/reference/status.html tomcat/site/trunk/docs/connectors-doc/reference/uriworkermap.html tomcat/site/trunk/docs/connectors-doc/reference/workers.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/apache.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/iis.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/nes.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/printer/apache.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/printer/iis.html tomcat/site/trunk/docs/connectors-doc/webserver_howto/printer/nes.html Modified: tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13a.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13a.html?rev=1848964&r1=1848963&r2=1848964&view=diff ============================================================================== --- tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13a.html (original) +++ tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13a.html Fri Dec 14 17:45:49 2018 @@ -1,5 +1,35 @@ -<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Apache Tomcat Connectors - AJP Protocol Reference - AJPv13</title><meta name="author" value="dan...@shore.net"><meta name="email" value="dan...@shore.net"><meta name="author" value="Jean-Frederic Clere"><meta name="email" value="jfrederic.cl...@fujitsu-siemens.com"><link href="../style.css" type="text/css" rel="stylesheet"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="4"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="left" alt="Apache Tomcat" border="0"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf-logo.gif" align="right" alt=" :: Apache Software Foundation" border="0"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--LEF T SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Common HowTo</strong></p><ul><li><a href="../common_howto/quick.html">For the impatient</a></li><li><a href="../common_howto/workers.html">All about workers</a></li><li><a href="../common_howto/timeouts.html">Timeouts</a></li><li><a href="../common_howto/loadbalancers.html">Load Balancing</a></li><li><a href="../common_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Web Server HowTo</strong></p><ul><li><a href="../webserver_howto/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="../webserver_howto/iis.html">Microsoft IIS (ISAPI redirector)</a></li><li><a href="../webserver_howto/nes.html">iPlanet Web Server (NSAPI redirector)</a></li></ul><p><strong>Reference Guide</strong></p><ul><li><a href="../reference/workers.html">workers.properties</a></li><li><a href="../reference/uriworkermap.html">uriworkermap.prop erties</a></li><li><a href="../reference/status.html">Status Worker</a></li><li><a href="../reference/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="../reference/iis.html">Microsoft IIS (ISAPI redirector)</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13 (ajp13)</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_t o1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20180301.html">2018</a></li><li><a href="../news/20160901.html">2016</a></li><li><a href="../news/20150101.html">2015</a></li><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html"> 2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.html">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li><a href="../news/20041100.html">2004</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connectors - AJP Protocol Reference</h1><h2>AJPv13</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/ajpv13a.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version - </a></small></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Intro"><strong>Intro</strong></a></font></td></tr><tr><td><blockquote> +<!DOCTYPE html SYSTEM "about:legacy-compat"> +<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="../images/docs-stylesheet.css" rel="stylesheet" type="text/css"><title>The Apache Tomcat Connectors: mod_jk, ISAPI redirector, NSAPI redirector (1.2.x) - AJPv13</title><meta name="author" content="dan...@shore.net"><meta name="author" content="Jean-Frederic Clere"><script type="application/javascript" data-comments-identifier=""> + "use strict"; // Enable strict mode + + (function() { + var thisScript = document.currentScript; + if (!thisScript) { // Workaround for IE <= 11 + var scripts = document.getElementsByTagName("script"); + thisScript = scripts[scripts.length - 1]; + } + document.addEventListener("DOMContentLoaded", (function() { + var commentsDiv = document.getElementById("comments_thread"); + var commentsShortname = "tomcat"; + var commentsIdentifier = "https://tomcat.apache.org/" + + thisScript.getAttribute("data-comments-identifier") + ".html"; + + (function(w, d) { + if (w.location.hostname.toLowerCase() == "tomcat.apache.org") { + var s = d.createElement("script"); + s.type = "application/javascript"; + s.async = true; + s.src = "https://comments.apache.org/show_comments.lua?site=" + + encodeURIComponent(commentsShortname) + + "&page=" + encodeURIComponent(commentsIdentifier); + d.head.appendChild(s); + } else { + commentsDiv.appendChild(d.createTextNode("Comments are disabled for this page at the moment.")); + } + })(window, document); + }), false); + })(); + </script></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="http://tomcat.apache.org/"><img alt="Tomcat Home" src="../images/tomcat.png"></a></div><div style="height: 1px;"></div><div class="asfLogo noPrint"><a href="https://www.apache.org/" target="_blank"><img src="../images/asf-logo.svg" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"></a></div><h1>The Apache Tomcat Connectors: mod_jk, ISAPI redirector, NSAPI redirector</h1><div style="height: 1px;"></div><div style="clear: left;"></div></div></div></div></header><div id="middle"><div><div id="mainLeft" class="noprint"><div><nav><div><h2>Links</h2><ul><li><a href="index.html">Docs Home</a></li></ul></div><div><h2>Common HowTo</h2><ul><li><a href="common_howto/quick.html">For the impatient</a></li><li><a href="common_howto/workers.html">All about workers</a></li><li><a href="common_howto/timeouts.html">Timeouts</a></li><li><a href="common_howto/loadbalanc ers.html">Load Balancing</a></li><li><a href="common_howto/proxy.html">Reverse Proxy</a></li></ul></div><div><h2>Web Server HowTo</h2><ul><li><a href="webserver_howto/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="webserver_howto/iis.html">Microsoft IIS (ISAPI redirector)</a></li><li><a href="webserver_howto/nes.html">iPlanet Web Server (NSAPI redirector)</a></li></ul></div><div><h2>Reference Guide</h2><ul><li><a href="reference/workers.html">workers.properties</a></li><li><a href="reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="reference/status.html">Status Worker</a></li><li><a href="reference/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="reference/iis.html">Microsoft IIS (ISAPI redirector)</a></li></ul></div><div><h2>AJP Protocol Reference</h2><ul><li><a href="ajp/ajpv13a.html">AJPv13 (ajp13)</a></li><li><a href="ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul></div><div><h2>Miscellaneous Documentation</h2><ul><l i><a href="miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href=" miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul></div><div><h2>News</h2><ul><li><a href="news/20180301.html">2018</a></li><li><a href="news/20160901.html">2016</a></li><li><a href="news/20150101.html">2015</a></li><li><a href="news/20140201.html">2014</a></li><li><a href="news/20120301.html">2012</a></li><li><a href="news/20110701.html">2011</a></li><li><a href="news/20100101.html">2010</a></li><li><a href="news/20090301.html">2009</a></li><li><a href="news/20081001.html">2008</a></li><li><a href="news/20070301.html">2007</a></li><li><a href="news/20060101.html">2006</a></li><li><a href="news/20050101.html">2005</a></li><li><a href="news/20041100.html">2004</a></li></ul></div></nav></div></div><div id="mainRight"><div id="content"><h2>AJPv13</h2><h3 id="Intro">Intro</h3><div class="text"> <p> The original document was written by @@ -17,7 +47,7 @@ make life easier for maintainers of JK, port the protocol somewhere (into jakarta 4.x, for example). </p> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="author"><strong>author</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="author">author</h3><div class="text"> <p> I am not one of the designers of this protocol -- I believe that Gal @@ -30,7 +60,7 @@ only my guesses. In general, the C code and comprehensible (if almost totally undocumented). I've cleaned up the Java code, and I think it's reasonably readable. </p> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Design Goals"><strong>Design Goals</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Design_Goals">Design Goals</h3><div class="text"> <p> According to email from Gal Shachor to the jakarta-dev mailing list, @@ -41,14 +71,14 @@ relate to communication between the web <ul> <li> Increasing performance (speed, specifically). </li> - <li> Adding support for SSL, so that <b class="code">isSecure()</b> and - <b class="code">getScheme()</b> will function correctly within the servlet + <li> Adding support for SSL, so that <code>isSecure()</code> and + <code>getScheme()</code> will function correctly within the servlet container. The client certificates and cipher suite will be available to servlets as request attributes. </li> </ul> </p> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Overview of the protocol"><strong>Overview of the protocol</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Overview_of_the_protocol">Overview of the protocol</h3><div class="text"> <p> The <b>ajp13</b> protocol is packet-oriented. A binary format was @@ -103,7 +133,7 @@ following messages back to the web serve Each message is accompanied by a differently formatted packet of data. See Response Packet Structures below for details. </p> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Basic Packet Structure"><strong>Basic Packet Structure</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Basic_Packet_Structure">Basic Packet Structure</h3><div class="text"> <p> There is a bit of an XDR heritage to this protocol, but it differs in @@ -133,7 +163,7 @@ strings. <dd>A variable-sized string (length bounded by 2^16). Encoded with the length packed into two bytes first, followed by the string (including the terminating '\0'). Note that the encoded length does <b>not</b> include - the trailing '\0' -- it is like <b class="code">strlen</b>. This is a touch + the trailing '\0' -- it is like <code>strlen</code>. This is a touch confusing on the Java side, which is littered with odd autoincrement statements to skip over these terminators. I believe the reason this was done was to allow the C code to be extra efficient when reading strings @@ -146,19 +176,19 @@ strings. </dl> </p> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Packet Size"><strong>Packet Size</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Packet_Size">Packet Size</h4><div class="text"> <p> According to much of the code, the max packet size is 8 * 1024 bytes (8K). The actual length of the packet is encoded in the header. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Packet Headers"><strong>Packet Headers</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Packet_Headers">Packet Headers</h4><div class="text"> <p> Packets sent from the server to the container begin with -<b class="code">0x1234</b>. Packets sent from the container to the server begin -with <b class="code">AB</b> (that's the ASCII code for A followed by the ASCII +<code>0x1234</code>. Packets sent from the container to the server begin +with <code>AB</code> (that's the ASCII code for A followed by the ASCII code for B). After those first two bytes, there is an integer (encoded as above) with the length of the payload. Although this might suggest that the maximum payload could be as large as 2^16, in fact, the code sets the @@ -255,11 +285,11 @@ The web server can send the following me </p> <p> To ensure some -basic security, the container will only actually do the <b class="code">Shutdown</b> if the +basic security, the container will only actually do the <code>Shutdown</code> if the request comes from the same machine on which it's hosted. </p> <p> -The first <b class="code">Data</b> packet is send immediatly after the <b class="code">Forward Request</b> by the web server. +The first <code>Data</code> packet is send immediatly after the <code>Forward Request</code> by the web server. </p> <p>The servlet container can send the following types of messages to the web @@ -303,14 +333,13 @@ server: <p> Each of the above messages has a different internal structure, detailed below. </p> -</blockquote></td></tr></table> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Request Packet Structure"><strong>Request Packet Structure</strong></a></font></td></tr><tr><td><blockquote> +</div></div> +</div><h3 id="Request_Packet_Structure">Request Packet Structure</h3><div class="text"> <p> For messages from the server to the container of type "Forward Request": </p><p> -<div class="example"><pre> -AJP13_FORWARD_REQUEST := +<div class="codeBox"><pre><code>AJP13_FORWARD_REQUEST := prefix_code (byte) 0x02 = JK_AJP13_FORWARD_REQUEST method (byte) protocol (string) @@ -324,28 +353,25 @@ AJP13_FORWARD_REQUEST := request_headers *(req_header_name req_header_value) attributes *(attribut_name attribute_value) request_terminator (byte) OxFF -</pre></div> +</code></pre></div> </p><p> -The <b class="code">request_headers</b> have the following structure: +The <code>request_headers</code> have the following structure: </p><p> -<div class="example"><pre> -req_header_name := +<div class="codeBox"><pre><code>req_header_name := sc_req_header_name | (string) [see below for how this is parsed] sc_req_header_name := 0xA0xx (integer) req_header_value := (string) -</pre></div> +</code></pre></div> </p><p> -The <b class="code">attributes</b> are optional and have the following structure: +The <code>attributes</code> are optional and have the following structure: </p><p> -<div class="example"><pre> -attribute_name := sc_a_name | (sc_a_req_attribute string) +<div class="codeBox"><pre><code>attribute_name := sc_a_name | (sc_a_req_attribute string) attribute_value := (string) - -</pre></div> +</code></pre></div> </p><p> Not that the all-important header is "content-length', because it determines whether or not the container looks for another packet @@ -353,14 +379,14 @@ immediately. </p><p> Detailed description of the elements of Forward Request. </p> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="request_prefix"><strong>request_prefix</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="request_prefix">request_prefix</h4><div class="text"> <p> For all requests, this will be 2. See above for details on other <A HREF="#prefix-codes">prefix codes</A>. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="method"><strong>method</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="method">method</h4><div class="text"> <p> The HTTP method, encoded as a single byte: </p> @@ -402,25 +428,25 @@ The HTTP method, encoded as a single byt additional methods, even if they are not in this list. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="protocol, req_uri, remote_addr, remote_host, server_name, server_port, is_ssl"><strong>protocol, req_uri, remote_addr, remote_host, server_name, server_port, is_ssl</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="protocol,_req_uri,_remote_addr,_remote_host,_server_name,_server_port,_is_ssl">protocol, req_uri, remote_addr, remote_host, server_name, server_port, is_ssl</h4><div class="text"> <p> These are all fairly self-explanatory. Each of these is required, and will be sent for every request. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Headers"><strong>Headers</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Headers">Headers</h4><div class="text"> <p> - The structure of <b class="code">request_headers</b> is the following: - First, the number of headers <b class="code">num_headers</b> is encoded. - Then, a series of header name <b class="code">req_header_name</b> / value - <b class="code">req_header_value</b> pairs follows. + The structure of <code>request_headers</code> is the following: + First, the number of headers <code>num_headers</code> is encoded. + Then, a series of header name <code>req_header_name</code> / value + <code>req_header_value</code> pairs follows. Common header names are encoded as integers, to save space. If the header name is not in the list of basic headers, it is encoded normally (as a string, with prefixed length). The list of - common headers <b class="code">sc_req_header_name</b>and their codes + common headers <code>sc_req_header_name</code>and their codes is as follows (all are case-sensitive): </p><p> <table> @@ -442,7 +468,7 @@ additional methods, even if they are not </table> </p><p> The Java code that reads this grabs the first two-byte integer and if - it sees an <b class="code">'0xA0'</b> in the most significant + it sees an <code>'0xA0'</code> in the most significant byte, it uses the integer in the second byte as an index into an array of header names. If the first byte is not '0xA0', it assumes that the two-byte integer is the length of a string, which is then read in. @@ -455,18 +481,18 @@ additional methods, even if they are not unmanageably huge header names will be showing up in the HTTP spec any time soon). </p><p> - <b>Note:</b> The <b class="code">content-length</b> header is extremely + <b>Note:</b> The <code>content-length</code> header is extremely important. If it is present and non-zero, the container assumes that the request has a body (a POST request, for example), and immediately reads a separate packet off the input stream to get that body. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Attributes">Attributes</h4><div class="text"> <p> - The attributes prefixed with a <b class="code">?</b> - (e.g. <b class="code">?context</b>) are all optional. For each, there is a + The attributes prefixed with a <code>?</code> + (e.g. <code>?context</code>) are all optional. For each, there is a single byte code to indicate the type of attribute, and then a string to give its value. They can be sent in any order (though the C code always sends them in the order listed below). A special terminating code is @@ -494,30 +520,30 @@ additional methods, even if they are not </p><p> - The <b class="code">context</b> and <b class="code">servlet_path</b> are not currently + The <code>context</code> and <code>servlet_path</code> are not currently set by the C code, and most of the Java code completely ignores whatever is sent over for those fields (and some of it will actually break if a string is sent along after one of those codes). I don't know if this is a bug or an unimplemented feature or just vestigial code, but it's missing from both sides of the connection. </p><p> - The <b class="code">remote_user</b> and <b class="code">auth_type</b> presumably refer + The <code>remote_user</code> and <code>auth_type</code> presumably refer to HTTP-level authentication, and communicate the remote user's username and the type of authentication used to establish their identity (e.g. Basic, Digest). I'm not clear on why the password isn't also sent, but I don't know HTTP authentication inside and out. </p><p> - The <b class="code">query_string</b>, <b class="code">ssl_cert</b>, - <b class="code">ssl_cipher</b>, and <b class="code">ssl_session</b> refer to the + The <code>query_string</code>, <code>ssl_cert</code>, + <code>ssl_cipher</code>, and <code>ssl_session</code> refer to the corresponding pieces of HTTP and HTTPS. </p><p> - The <b class="code">route</b>, as I understand it, is used to support sticky + The <code>route</code>, as I understand it, is used to support sticky sessions -- associating a user's session with a particular Tomcat instance in the presence of multiple, load balancing servers. I don't know the details. </p><p> Beyond this list of basic attributes, any number of other attributes can - be sent via the <b class="code">req_attribute</b> code (0x0A). A pair of strings + be sent via the <code>req_attribute</code> code (0x0A). A pair of strings to represent the attribute name and value are sent immediately after each instance of that code. Environment values are passed in via this method. </p><p> @@ -525,15 +551,14 @@ additional methods, even if they are not 0xFF, is sent. This signals both the end of the list of attributes and also then end of the Request Packet. </p> -</blockquote></td></tr></table> +</div></div> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Response Packet Structure"><strong>Response Packet Structure</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Response_Packet_Structure">Response Packet Structure</h3><div class="text"> <p> For messages which the container can send back to the server. -<div class="example"><pre> -AJP13_SEND_BODY_CHUNK := +<div class="codeBox"><pre><code>AJP13_SEND_BODY_CHUNK := prefix_code 3 chunk_length (integer) chunk *(byte) @@ -561,20 +586,20 @@ AJP13_END_RESPONSE := AJP13_GET_BODY_CHUNK := prefix_code 6 requested_length (integer) -</pre></div> +</code></pre></div> </p> <p> Details: </p> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Send Body Chunk"><strong>Send Body Chunk</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Send_Body_Chunk">Send Body Chunk</h4><div class="text"> <p> The chunk is basically binary data, and is sent directly back to the browser. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Send Headers"><strong>Send Headers</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Send_Headers">Send Headers</h4><div class="text"> <p> The status code and message are the usual HTTP things (e.g. "200" and "OK"). The response header names are encoded the same way the request header names are. @@ -605,25 +630,25 @@ Details: encoded. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="End Response"><strong>End Response</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="End_Response">End Response</h4><div class="text"> <p> Signals the end of this request-handling cycle. If the - <b class="code">reuse</b> flag is true (anything other than 0 in the actual + <code>reuse</code> flag is true (anything other than 0 in the actual C code), this TCP connection can now be used to handle new incoming - requests. If <b class="code">reuse</b> is false (==0), the connection + requests. If <code>reuse</code> is false (==0), the connection should be closed. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Get Body Chunk"><strong>Get Body Chunk</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Get_Body_Chunk">Get Body Chunk</h4><div class="text"> <p> The container asks for more data from the request (If the body was too large to fit in the first packet sent over or when the request is chuncked). The server will send a body packet back with an amount of data which is - the minimum of the <b class="code">request_length</b>, + the minimum of the <code>request_length</code>, the maximum send body size (8186 (8 Kbytes - 6)), and the number of bytes actually left to send from the request body. <br> @@ -632,8 +657,8 @@ Details: "empty" packet, which is a body packet with a payload length of 0. (0x12,0x34,0x00,0x00) </p> -</blockquote></td></tr></table> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Questions I Have"><strong>Questions I Have</strong></a></font></td></tr><tr><td><blockquote> +</div></div> +</div><h3 id="Questions_I_Have">Questions I Have</h3><div class="text"> <p> What happens if the request headers > max packet size? There is no provision to send a second packet of request headers in case there are more @@ -648,6 +673,18 @@ fail before trying to send any headers i of the connection between the web server and the container. This strikes me as potentially dangerous.</p> -</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em> - Copyright © 1999-2018, Apache Software Foundation - </em></font></div></td></tr></table></body></html> \ No newline at end of file +</div><div class="noprint"><h3 id="comments_section"> + Comments + </h3><div class="text"><p class="notice"><strong>Notice:</strong> This comments section collects your suggestions + on improving documentation for Apache Tomcat.<br><br> + If you have trouble and need help, read + <a href="https://tomcat.apache.org/findhelp.html">Find Help</a> page + and ask your question on the tomcat-users + <a href="https://tomcat.apache.org/lists.html">mailing list</a>. + Do not ask such questions here. This is not a Q&A section.<br><br> + The Apache Comments System is explained <a href="../comments.html">here</a>. + Comments may be removed by our moderators if they are either + implemented or considered invalid/off-topic. + </p><div id="comments_thread"></div></div></div></div></div></div></div><footer><div id="footer"> + Copyright © 1999-yyyy, The Apache Software Foundation + </div></footer></div></body></html> \ No newline at end of file Modified: tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13ext.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13ext.html?rev=1848964&r1=1848963&r2=1848964&view=diff ============================================================================== --- tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13ext.html (original) +++ tomcat/site/trunk/docs/connectors-doc/ajp/ajpv13ext.html Fri Dec 14 17:45:49 2018 @@ -1,5 +1,35 @@ -<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Apache Tomcat Connectors - AJP Protocol Reference - AJPv13 extensions Proposal</title><meta name="author" value="Henri Gomez"><meta name="email" value="hgo...@apache.org"><link href="../style.css" type="text/css" rel="stylesheet"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="4"><!--PAGE HEADER--><tr><td colspan="2"><!--TOMCAT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="left" alt="Apache Tomcat" border="0"></a><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="http://www.apache.org/images/asf-logo.gif" align="right" alt=" :: Apache Software Foundation" border="0"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul ><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Common >HowTo</strong></p><ul><li><a href="../common_howto/quick.html">For the >impatient</a></li><li><a href="../common_howto/workers.html">All about >workers</a></li><li><a >href="../common_howto/timeouts.html">Timeouts</a></li><li><a >href="../common_howto/loadbalancers.html">Load Balancing</a></li><li><a >href="../common_howto/proxy.html">Reverse Proxy</a></li></ul><p><strong>Web >Server HowTo</strong></p><ul><li><a >href="../webserver_howto/apache.html">Apache HTTP Server >(mod_jk)</a></li><li><a href="../webserver_howto/iis.html">Microsoft IIS >(ISAPI redirector)</a></li><li><a href="../webserver_howto/nes.html">iPlanet >Web Server (NSAPI redirector)</a></li></ul><p><strong>Reference >Guide</strong></p><ul><li><a >href="../reference/workers.html">workers.properties</a></li><li><a >href="../reference/uriworkermap.html">uriworkermap.properties</a></li><li><a >href="../reference/status.html">Status Worker</a></li><li><a href="../ref erence/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="../reference/iis.html">Microsoft IIS (ISAPI redirector)</a></li></ul><p><strong>AJP Protocol Reference</strong></p><ul><li><a href="../ajp/ajpv13a.html">AJPv13 (ajp13)</a></li><li><a href="../ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul><p><strong>Miscellaneous Documentation</strong></p><ul><li><a href="../miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="../miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emai lcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="../miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href="../miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="../miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul><p><strong>News</strong></p><ul><li><a href="../news/20180301.html">2018</a></li><li><a href="../news/20160901.html">2016</a></li><li><a href="../news/20150101.html">2015</a></li><li><a href="../news/20140201.html">2014</a></li><li><a href="../news/20120301.html">2012</a></li><li><a href="../news/20110701.html">2011</a></li><li><a href="../news/20100101.htm l">2010</a></li><li><a href="../news/20090301.html">2009</a></li><li><a href="../news/20081001.html">2008</a></li><li><a href="../news/20070301.html">2007</a></li><li><a href="../news/20060101.html">2006</a></li><li><a href="../news/20050101.html">2005</a></li><li><a href="../news/20041100.html">2004</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>The Apache Tomcat Connectors - AJP Protocol Reference</h1><h2>AJPv13 extensions Proposal</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/ajpv13ext.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version - </a></small></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote> +<!DOCTYPE html SYSTEM "about:legacy-compat"> +<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="../images/docs-stylesheet.css" rel="stylesheet" type="text/css"><title>The Apache Tomcat Connectors: mod_jk, ISAPI redirector, NSAPI redirector (1.2.x) - AJPv13 extensions Proposal</title><meta name="author" content="Henri Gomez"><script type="application/javascript" data-comments-identifier=""> + "use strict"; // Enable strict mode + + (function() { + var thisScript = document.currentScript; + if (!thisScript) { // Workaround for IE <= 11 + var scripts = document.getElementsByTagName("script"); + thisScript = scripts[scripts.length - 1]; + } + document.addEventListener("DOMContentLoaded", (function() { + var commentsDiv = document.getElementById("comments_thread"); + var commentsShortname = "tomcat"; + var commentsIdentifier = "https://tomcat.apache.org/" + + thisScript.getAttribute("data-comments-identifier") + ".html"; + + (function(w, d) { + if (w.location.hostname.toLowerCase() == "tomcat.apache.org") { + var s = d.createElement("script"); + s.type = "application/javascript"; + s.async = true; + s.src = "https://comments.apache.org/show_comments.lua?site=" + + encodeURIComponent(commentsShortname) + + "&page=" + encodeURIComponent(commentsIdentifier); + d.head.appendChild(s); + } else { + commentsDiv.appendChild(d.createTextNode("Comments are disabled for this page at the moment.")); + } + })(window, document); + }), false); + })(); + </script></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="http://tomcat.apache.org/"><img alt="Tomcat Home" src="../images/tomcat.png"></a></div><div style="height: 1px;"></div><div class="asfLogo noPrint"><a href="https://www.apache.org/" target="_blank"><img src="../images/asf-logo.svg" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"></a></div><h1>The Apache Tomcat Connectors: mod_jk, ISAPI redirector, NSAPI redirector</h1><div style="height: 1px;"></div><div style="clear: left;"></div></div></div></div></header><div id="middle"><div><div id="mainLeft" class="noprint"><div><nav><div><h2>Links</h2><ul><li><a href="index.html">Docs Home</a></li></ul></div><div><h2>Common HowTo</h2><ul><li><a href="common_howto/quick.html">For the impatient</a></li><li><a href="common_howto/workers.html">All about workers</a></li><li><a href="common_howto/timeouts.html">Timeouts</a></li><li><a href="common_howto/loadbalanc ers.html">Load Balancing</a></li><li><a href="common_howto/proxy.html">Reverse Proxy</a></li></ul></div><div><h2>Web Server HowTo</h2><ul><li><a href="webserver_howto/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="webserver_howto/iis.html">Microsoft IIS (ISAPI redirector)</a></li><li><a href="webserver_howto/nes.html">iPlanet Web Server (NSAPI redirector)</a></li></ul></div><div><h2>Reference Guide</h2><ul><li><a href="reference/workers.html">workers.properties</a></li><li><a href="reference/uriworkermap.html">uriworkermap.properties</a></li><li><a href="reference/status.html">Status Worker</a></li><li><a href="reference/apache.html">Apache HTTP Server (mod_jk)</a></li><li><a href="reference/iis.html">Microsoft IIS (ISAPI redirector)</a></li></ul></div><div><h2>AJP Protocol Reference</h2><ul><li><a href="ajp/ajpv13a.html">AJPv13 (ajp13)</a></li><li><a href="ajp/ajpv13ext.html">AJPv13 Extension Proposal</a></li></ul></div><div><h2>Miscellaneous Documentation</h2><ul><l i><a href="miscellaneous/faq.html">Frequently asked questions</a></li><li><a href="miscellaneous/changelog.html">Changelog</a></li><li><a href="http://issues.apache.org/bugzilla/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Tomcat+Connectors&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=">Current Tomcat Connectors bugs</a></li><li><a href="miscellaneous/doccontrib.html">Contribute documentation</a></li><li><a href=" miscellaneous/jkstatustasks.html">JK Status Ant Tasks</a></li><li><a href="miscellaneous/reporttools.html">Reporting Tools</a></li><li><a href="http://tomcat.apache.org/connectors-doc-archive/jk2/index.html">Old JK/JK2 documentation</a></li></ul></div><div><h2>News</h2><ul><li><a href="news/20180301.html">2018</a></li><li><a href="news/20160901.html">2016</a></li><li><a href="news/20150101.html">2015</a></li><li><a href="news/20140201.html">2014</a></li><li><a href="news/20120301.html">2012</a></li><li><a href="news/20110701.html">2011</a></li><li><a href="news/20100101.html">2010</a></li><li><a href="news/20090301.html">2009</a></li><li><a href="news/20081001.html">2008</a></li><li><a href="news/20070301.html">2007</a></li><li><a href="news/20060101.html">2006</a></li><li><a href="news/20050101.html">2005</a></li><li><a href="news/20041100.html">2004</a></li></ul></div></nav></div></div><div id="mainRight"><div id="content"><h2>AJPv13 extensions Proposal</h2><h3 id="Introduction">I ntroduction</h3><div class="text"> <p> This document is a proposal of evolution of the current Apache JServ Protocol version 1.3, also known as ajp13. @@ -8,7 +38,7 @@ I'll not cover here the full protocol bu This nth pass include comments from the tomcat-dev list and misses discovered during developpment. </p> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Missing features in AJP13"><strong>Missing features in AJP13</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Missing_features_in_AJP13">Missing features in AJP13</h4><div class="text"> <p> ajp13 is a good protocol to link a servlet engine like tomcat to a web server like Apache: @@ -60,9 +90,9 @@ But ajp13 lacks support for: </ul> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Proposed add-ons to AJP13"><strong>Proposed add-ons to AJP13</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Proposed_add-ons_to_AJP13">Proposed add-ons to AJP13</h4><div class="text"> <p> Let's descrive here the features and add-on that could be added to AJP13. Since this document is a proposal, a reasonable level of chaos must be expected at first. @@ -100,9 +130,9 @@ Add extra SSL informations needed by Ser </ul> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Advanced login"><strong>Advanced login</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Advanced_login">Advanced login</h4><div class="text"> <p> <ol> @@ -151,12 +181,11 @@ We add here four negociations flags to p informations on client SSL data (certs), server SSL datas, crypto used, and misc datas (timeout...). </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Messages Stream"><strong>Messages Stream</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Messages_Stream">Messages Stream</h4><div class="text"> <p> -<div class="example"><pre> -+----------------+------------------+-----------------+ +<div class="codeBox"><pre><code>+----------------+------------------+-----------------+ | LOGIN INIT CMD | NEGOCIATION DATA | WEB SERVER INFO | +----------------+------------------+-----------------+ @@ -175,7 +204,7 @@ crypto used, and misc datas (timeout...) +------------+--------------+ | LOGNOK CMD | FAILURE CODE | +------------+--------------+ -</pre></div> +</code></pre></div> <ul> <li> @@ -194,21 +223,19 @@ WEB SERVER INFO, SERVLET ENGINE INFO are The secret key will be set by a new property in workers.properties: secretkey -<div class="example"><pre> -worker.ajp13.port=8009 +<div class="codeBox"><pre><code>worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.secretkey=myverysecretkey -</pre></div> +</code></pre></div> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Shutdown feature"><strong>Shutdown feature</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Shutdown_feature">Shutdown feature</h4><div class="text"> <p> AJP13 miss a functionality of AJP12, which is shutdown command. A logout will tell servlet engine to shutdown itself. -<div class="example"><pre> -+--------------+----------------------------+ +<div class="codeBox"><pre><code>+--------------+----------------------------+ | SHUTDOWN CMD | MD5 of RANDOM + SECRET KEY | +--------------+----------------------------+ @@ -219,7 +246,7 @@ A logout will tell servlet engine to shu +-------------+--------------+ | SHUTNOK CMD | FAILURE CODE | +-------------+--------------+ -</pre></div> +</code></pre></div> <ul> <li> @@ -234,9 +261,9 @@ FAILURE CODE is 32 bits long. </ul> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Extended Env Vars feature"><strong>Extended Env Vars feature</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Extended_Env_Vars_feature">Extended Env Vars feature</h4><div class="text"> <p> NOTA: @@ -258,8 +285,7 @@ attributes list: In the AJP13, we've got: -<div class="example"><pre> -AJP13_FORWARD_REQUEST := +<div class="codeBox"><pre><code>AJP13_FORWARD_REQUEST := prefix_code 2 method (byte) protocol (string) @@ -284,21 +310,19 @@ AJP13_FORWARD_REQUEST := ?attributes *(attribute_name attribute_value) request_terminator (byte) -</pre></div> +</code></pre></div> Using short 'web server attribute name' will reduce the network traffic. -<div class="example"><pre> -+-------------------+---------------------------+-------------------------------+----+ +<div class="codeBox"><pre><code>+-------------------+---------------------------+-------------------------------+----+ | EXTENDED VARS CMD | WEB SERVER ATTRIBUTE NAME | SERVLET ENGINE ATTRIBUTE NAME | ES | +-------------------+---------------------------+-------------------------------+----+ -</pre></div> +</code></pre></div> ie: -<div class="example"><pre> -JkExtVars S1 SSL_CLIENT_V_START javax.servlet.request.ssl_start_cert_date +<div class="codeBox"><pre><code>JkExtVars S1 SSL_CLIENT_V_START javax.servlet.request.ssl_start_cert_date JkExtVars S2 SSL_CLIENT_V_END javax.servlet.request.ssl_end_cert_date JkExtVars S3 SSL_SESSION_ID javax.servlet.request.ssl_session_id @@ -312,7 +336,7 @@ JkExtVars S3 SSL_SESSION_ID javax.se +----+-----------------------------------------+ | S3 | javax.servlet.request.ssl_end_cert_date | +----+-----------------------------------------+ -</pre></div> +</code></pre></div> During transmission in extended AJP13 we'll see attributes name containing S1, S2, S3 and attributes values of @@ -336,9 +360,9 @@ ES is an empty CString. </ul> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Context informations forwarding for Servlet engine to web server"><strong>Context informations forwarding for Servlet engine to web server</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Context_informations_forwarding_for_Servlet_engine_to_web_server">Context informations forwarding for Servlet engine to web server</h4><div class="text"> <p> Just after the LOGON PHASE, the web server will ask for the list of contexts and URLs/URIs handled by the servlet engine. @@ -367,15 +391,14 @@ these particular virtual server (defined This feature will help ISP and big sites which mutualize large farm of Tomcat in load balancing configuration. -<div class="example"><pre> -+-----------------+-------------------+----------+----------+----+ +<div class="codeBox"><pre><code>+-----------------+-------------------+----------+----------+----+ | CONTEXT QRY CMD | VIRTUAL HOST NAME | CONTEXTA | CONTEXTB | ES | +-----------------+-------------------+----------+----------+----+ +------------------+-------------------+----------+-------------------+----------+---------------+----+ | CONTEXT INFO CMD | VIRTUAL HOST NAME | CONTEXTA | URL1 URL2 URL3 ES | CONTEXTB | URL1 URL2 ... | ES | +------------------+-------------------+----------+-------------------+----------+---------------+----+ -</pre></div> +</code></pre></div> We'll discover via context-query, the list of URL/MIMES handled by the remove servlet engine for a list of contextes. @@ -400,9 +423,9 @@ NB:<br> When VirtualMode is not to be used, the VIRTUAL HOST NAME is '*'. In that case the servlet engine will send all contexts handled. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Context informations updates from Servlet engine to web server"><strong>Context informations updates from Servlet engine to web server</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Context_informations_updates_from_Servlet_engine_to_web_server">Context informations updates from Servlet engine to web server</h4><div class="text"> <p> Context update are messages caming from the servlet engine each time a context is desactivated/reactivated. The update will be in use when the directive JkUpdateMount. @@ -410,11 +433,10 @@ This directive will set the AJP13_CONTEX ie: JkUpdateMount myworker1 -<div class="example"><pre> -+--------------------+-------------------+----------+--------+----------+--------+----+ +<div class="codeBox"><pre><code>+--------------------+-------------------+----------+--------+----------+--------+----+ | CONTEXT UPDATE CMD | VIRTUAL HOST NAME | CONTEXTA | STATUS | CONTEXTB | STATUS | ES | +--------------------+-------------------+----------+--------+----------+--------+----+ -</pre></div> +</code></pre></div> <ul> <li> @@ -432,22 +454,21 @@ NB:<br> When VirtualMode is not in use, the VIRTUAL HOST NAME is '*'. STATUS is one byte indicating if context is UP/DOWN/INVALID </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Context status query to Servlet engine"><strong>Context status query to Servlet engine</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Context_status_query_to_Servlet_engine">Context status query to Servlet engine</h4><div class="text"> <p> This query will be used by the web-server to determine if a given contexts are UP, DOWN or INVALID (and should be removed). -<div class="example"><pre> -+-------------------+--------------------+----------+----------+----+ +<div class="codeBox"><pre><code>+-------------------+--------------------+----------+----------+----+ | CONTEXT STATE CMD | VIRTUAL HOST NAME | CONTEXTA | CONTEXTB | ES | +-------------------+--------------------+----------+----------+----+ +-------------------------+-------------------+----------+--------+----------+--------+----+ | CONTEXT STATE REPLY CMD | VIRTUAL HOST NAME | CONTEXTA | STATUS | CONTEXTB | STATUS | ES | +-------------------------+-------------------+----------+-------------------+--------+----+ -</pre></div> +</code></pre></div> <ul> <li> @@ -464,20 +485,19 @@ ES is an empty CString NB:<br> When VirtualMode is not in use, the VIRTUAL HOST NAME is an empty string. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Handling of unknown packets"><strong>Handling of unknown packets</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Handling_of_unknown_packets">Handling of unknown packets</h4><div class="text"> <p> Sometimes even with a well negocied protocol, we may be in a situation where one end (web server or servlet engine), will receive a message it couldn't understand. In that case the receiver will send an 'UNKNOW PACKET CMD' with attached the unhandled message. -<div class="example"><pre> -+--------------------+------------------------+-------------------+ +<div class="codeBox"><pre><code>+--------------------+------------------------+-------------------+ | UNKNOWN PACKET CMD | UNHANDLED MESSAGE SIZE | UNHANDLED MESSAGE | +--------------------+------------------------+-------------------+ -</pre></div> +</code></pre></div> Depending on the message, the sender will report an error and if possible will try to forward the message to another endpoint. @@ -497,9 +517,9 @@ UNHANDLED MESSAGE is an array of byte (l NB:<br> added UNHANDLED MESSAGE SIZE (development) </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Verification of connection before sending request"><strong>Verification of connection before sending request</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Verification_of_connection_before_sending_request">Verification of connection before sending request</h4><div class="text"> <p> NOTA: This fonctionality may never be used, since it may slow up the normal process since requiring on the web-server side an extra IO (read) before forwarding @@ -518,8 +538,7 @@ for upload operations with more than 8ko The hack in the AJP13 protocol is to add some bytes to read after the end of the service: -<div class="example"><pre> -EXAMPLE OF DISCUSSION BETWEEN WEB SERVER AND SERVLET ENGINE +<div class="codeBox"><pre><code>EXAMPLE OF DISCUSSION BETWEEN WEB SERVER AND SERVLET ENGINE AJP HTTP-HEADER (+ HTTP-POST) (WEB->SERVLET) @@ -528,7 +547,7 @@ AJP HTTP-REPLY (SERVLET->WEB) AJP END OF DISCUSSION (SERVLET->WEB) ---> AJP STATUS (SERVLET->WEB AJP13) -</pre></div> +</code></pre></div> The AJP STATUS will not be read by the servlet engine at the end of the request/response #N but at the begining of the next session. @@ -544,11 +563,10 @@ it will search for another servlet engin And that feature will help ISP and big sites with farm of tomcat, to updates their servlet engine without any service interruption. -<div class="example"><pre> -+------------+-------------+ +<div class="codeBox"><pre><code>+------------+-------------+ | STATUS CMD | STATUS DATA | +------------+-------------+ -</pre></div> +</code></pre></div> <ul> <li> @@ -556,9 +574,9 @@ STATUS CMD and STATUS DATA are one byte </li> </ul> </p> -</blockquote></td></tr></table> +</div></div> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Conclusion"><strong>Conclusion</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Conclusion">Conclusion</h3><div class="text"> <p> The goal of the extended AJP13 protocol is to overcome some of the original AJP13 limitation. An easier configuration, a better support for large site and farm of Tomcat, @@ -567,12 +585,12 @@ a simple authentification system and pro Using the stable ajp13 implementation in JK (native) and in servlet engine (java), it's a reasonable evolution of the well known ajp13. </p> -</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Commands and IDs in extended AJP13 Index"><strong>Commands and IDs in extended AJP13 Index</strong></a></font></td></tr><tr><td><blockquote> +</div><h3 id="Commands_and_IDs_in_extended_AJP13_Index">Commands and IDs in extended AJP13 Index</h3><div class="text"> <p> Index of Commands and ID to be added in AJP13 Protocol </p> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Commands IDs"><strong>Commands IDs</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Commands_IDs">Commands IDs</h4><div class="text"> <p> <table> <tr><th>Command Name</th><th>Command Number</th></tr> @@ -594,9 +612,9 @@ Index of Commands and ID to be added in </table> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Negociations Flags"><strong>Negociations Flags</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Negociations_Flags">Negociations Flags</h4><div class="text"> <p> <table> <tr><th>Command Name</th><th>Number</th><th>Description</th></tr> @@ -624,9 +642,9 @@ Index of Commands and ID to be added in All others flags must be set to 0 since they are reserved for future use. </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Failure IDs"><strong>Failure IDs</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Failure_IDs">Failure IDs</h4><div class="text"> <p> <table> <tr><th>Failure Id</th><th>Number</th></tr> @@ -636,9 +654,9 @@ All others flags must be set to 0 since <tr><td>AJP13_SHUT_AUTHOR_FAILED_ERR</td><td>0xFFFFFFFC</td></tr> </table> </p> -</blockquote></td></tr></table> +</div></div> -<table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Status"><strong>Status</strong></a></font></td></tr><tr><td><blockquote> +<div class="subsection"><h4 id="Status">Status</h4><div class="text"> <p> <table> <tr><th>Failure Id</th><th>Number</th></tr> @@ -647,8 +665,20 @@ All others flags must be set to 0 since <tr><td>AJP13_CONTEXT_OK</td><td>0x03</td></tr> </table> </p> -</blockquote></td></tr></table> +</div></div> -</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em> - Copyright © 1999-2018, Apache Software Foundation - </em></font></div></td></tr></table></body></html> \ No newline at end of file +</div><div class="noprint"><h3 id="comments_section"> + Comments + </h3><div class="text"><p class="notice"><strong>Notice:</strong> This comments section collects your suggestions + on improving documentation for Apache Tomcat.<br><br> + If you have trouble and need help, read + <a href="https://tomcat.apache.org/findhelp.html">Find Help</a> page + and ask your question on the tomcat-users + <a href="https://tomcat.apache.org/lists.html">mailing list</a>. + Do not ask such questions here. This is not a Q&A section.<br><br> + The Apache Comments System is explained <a href="../comments.html">here</a>. + Comments may be removed by our moderators if they are either + implemented or considered invalid/off-topic. + </p><div id="comments_thread"></div></div></div></div></div></div></div><footer><div id="footer"> + Copyright © 1999-yyyy, The Apache Software Foundation + </div></footer></div></body></html> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org