You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2002/05/11 01:44:50 UTC

cvs commit: jakarta-tomcat-connectors/webapp/docs warp.xml style.xsl

jfclere     02/05/10 16:44:50

  Modified:    webapp/docs style.xsl
  Added:       webapp/docs warp.xml
  Log:
  Add protocol description.
  
  Revision  Changes    Path
  1.4       +41 -1     jakarta-tomcat-connectors/webapp/docs/style.xsl
  
  Index: style.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/docs/style.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- style.xsl	5 May 2002 03:30:42 -0000	1.3
  +++ style.xsl	10 May 2002 23:44:50 -0000	1.4
  @@ -239,7 +239,7 @@
     </xsl:template>
   
     <xsl:template match="p">
  -    <p class="section"><xsl:apply-templates select="b|a|text()"/></p>
  +    <p class="section"><xsl:apply-templates select="table|ul|b|a|text()"/></p>
     </xsl:template>
   
     <xsl:template match="b">
  @@ -249,6 +249,46 @@
     <xsl:template match="br">
       <br/>
     </xsl:template>
  +
  +  <!-- JFC added -->
  +  <xsl:template match="ul">
  +    <ul><xsl:apply-templates select="li"/></ul>
  +  </xsl:template>
  +
  +  <xsl:template match="li">
  +    <li><xsl:apply-templates select="text()"/></li>
  +  </xsl:template>
  +
  +  <xsl:template match="table">
  +    <table border="1"><xsl:apply-templates select="tr"/></table>
  +  </xsl:template>
  +
  +  <xsl:template match="tr">
  +    <tr><xsl:apply-templates select="td|td15|td13|td6|td5|td3|td2"/></tr>
  +  </xsl:template>
  +
  +  <xsl:template match="td">
  +    <td><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td15">
  +    <td colspan="15"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td13">
  +    <td colspan="13"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td6">
  +    <td colspan="6"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td5">
  +    <td colspan="5"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td3">
  +    <td colspan="3"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <xsl:template match="td2">
  +    <td colspan="2"><xsl:apply-templates select="b|a|text()"/></td>
  +  </xsl:template>
  +  <!-- end JFC -->
   
     <xsl:template match="screen">
       <p class="screen">
  
  
  
  1.1                  jakarta-tomcat-connectors/webapp/docs/warp.xml
  
  Index: warp.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document title="The WARP Protocol Version 1.0.2">
    <description>
      The WARP protocol element description. (1.0.2)
    </description>
  
    <section title="Data Packet Structure">
      <description>
       General packet format.
      </description>
  
      <p>
        All data sent on the full duplex connection between the client and
        server MUST follow this structure:
      </p>
  <p>
  <ul>
  <li>
  Data is sent in packets formed by a header describing some info about the
  packet itself followed by a data length and data payload.</li>
  
  <li>
  All packets MUST follow big endian style ("network order").</li>
  
  <li>
  The packet header is always 24 bits long and follow this format:</li>
  
  </ul>
  <ul>
  <li>
  Octet 0 (8 bits) contains the packet type.</li>
  
  <li>
  Octets 1-2 (16 bits) set the length of the data payload carried by the
  packet itself in numbers octets and MAY be zero.</li>
  
  <li>
  If the length of the data payload is more than zero, octets from 3 to (length
  + 3) contain the payload data or content.</li>
  </ul>
  
  </p><p>
  
  <table>
  
  <tr>
  <td15>
  WARP packet
  </td15>
  </tr>
  <tr>
  <td>Octet</td>
  
  <td5>1</td5>
  
  <td3>2</td3>
  
  <td3>3</td3>
  
  <td3>4 .. (length+3)</td3>
  </tr>
  
  <tr>
  <td>Bits</td>
  
  <td>0</td>
  
  <td>1</td>
  
  <td>..</td>
  
  <td>6</td>
  
  <td>7</td>
  
  <td>0</td>
  
  <td>1</td>
  
  <td2>..</td2>
  
  <td>14</td>
  
  <td>15</td>
  
  <td>0</td>
  
  <td>1</td>
  
  <td>..</td>
  </tr>
  
  <tr>
  <td>Description</td>
  
  <td5>Packet Type</td5>
  
  <td6>Payload Length</td6>
  
  <td3>Payload Data
  (Content)</td3>
  </tr>
  </table>
  </p>
  
  </section>
  
  <section title="Payload">
    <description>
    Payload Structure
    </description>
  
  <p>
  The payload of a packet can be structured in two ways, depending on its
  type: the packet can either contain raw data (such as an HTTP request or
  response body) or a combination of numeric values and strings.
  </p>
  <p>By definition a numeric value is a 32 bit signed integer represented
  in network byte order (the value of 6 decimal would be represented as
   000000000000000000000000000000000110
  binary (110 preceeded by 29 zeroes).
  </p><p>A string is defined in the following way: the first two octets represent
  the string length as an unsigned 16 bits value. This value indicates the
  number of octets that compose the encoded string. The string is not NULL
  terminated and is encoded following the UTF-8 standard. For example the
  string "fooBar" would be represented as:
  </p>
  <p>
  <table>
  <tr>
  <td13>
  String</td13>
  </tr>
  
  <tr>
  <td>Octet</td>
  
  <td3>1</td3>
  
  <td3>2</td3>
  
  <td>3</td>
  
  <td>4</td>
  
  <td>5</td>
  
  <td>6</td>
  
  <td>7</td>
  
  <td>8</td>
  </tr>
  
  <tr>
  <td>Bits</td>
  
  <td>0</td>
  
  <td>1</td>
  
  <td2>..</td2>
  
  <td>14</td>
  
  <td>15</td>
  
  <td6>..</td6>
  </tr>
  
  <tr>
  <td>Content</td>
  
  <td6>110 bin = 6
  dec</td6>
  
  <td>f</td>
  
  <td>o</td>
  
  <td>o</td>
  
  <td>B</td>
  
  <td>a</td>
  
  <td>r</td>
  </tr>
  </table>
  </p>
  
  </section>
  
  <section title="Packet Types">
    <description>
     The following is a list of packet types and their relative expected
     responses:
    </description>
  <p>
  <table>
  <tr>
  <td5>Packet/States Table</td5>
  </tr>
  
  <tr>
  <td>Name</td>
  
  <td>Type</td>
  
  <td>Originator</td>
  
  <td>Description</td>
  
  <td>Expects</td>
  </tr>
  
  <tr>
  <td>ERROR</td>
  
  <td>0x00</td>
  
  <td>Client Server</td>
  
  <td>One end of the peer notifies the other of a fatal connection error</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>DISCONNECT</td>
  
  <td>0xfe</td>
  
  <td>Client Server</td>
  
  <td>One end of the peer notifies the other that the connections is going
  to be closed</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>FATAL</td>
  
  <td>0xff</td>
  
  <td>Client
  <br/>Serve</td>
  
  <td>A protocol error occourred, the connection must be closed.</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  </tr>
  
  <tr>
  <td>CONF_WELCOME</td>
  
  <td>0x01</td>
  
  <td>Server</td>
  
  <td>First message sent by Server after a client connection.</td>
  
  <td>CONF_DEPLOY</td>
  </tr>
  
  <tr>
  <td>CONF_DEPLOY</td>
  
  <td>0x05</td>
  
  <td>Client</td>
  
  <td>Deploy a web application.</td>
  
  <td>CONF_APPLIC</td>
  </tr>
  
  <tr>
  <td>CONF_APPLIC</td>
  
  <td>0x06</td>
  
  <td>Server</td>
  
  <td>Application deployed successfully.</td>
  
  <td>CONF_MAP, CONF_DEPLOY</td>
  </tr>
  
  <tr>
  <td>CONF_MAP</td>
  
  <td>0x07</td>
  
  <td>Client</td>
  
  <td>Require for application mapping information</td>
  
  <td>CONF_MAP_DONE,CONF_MAP_ALLOW,CONF_MAP_DENY</td>
  </tr>
  
  <tr>
  <td>CONF_MAP_ALLOW</td>
  
  <td>0x08</td>
  
  <td>Server</td>
  
  <td>Allow client to map the request</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>CONF_MAP_DENY</td>
  
  <td>0x09</td>
  
  <td>Server</td>
  
  <td>Deny client to map the request</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>CONF_MAP_DONE</td>
  
  <td>0x0a</td>
  
  <td>Server</td>
  
  <td>All the ALLOW/DENY map have been transfered</td>
  
  <td>CONF_DEPLOY, CONF_DONE</td>
  </tr>
  
  <tr>
  <td>CONF_DONE</td>
  
  <td>0x0e</td>
  
  <td>Client</td>
  
  <td>Configuration completly sent to the server</td>
  
  <td>CONF_PROCEED</td>
  </tr>
  
  <tr>
  <td>CONF_PROCEED</td>
  
  <td>0x0f</td>
  
  <td>Server</td>
  
  <td>Server ready to accept requests.</td>
  
  <td>Request elements (REQ_INIT, REQ_CONTENT, REQ_SCHEME, REQ_AUTH, REQ_HEADER,
  REQ_SERVER, REQ_CLIENT, REQ_PROCEED)</td>
  </tr>
  
  <tr>
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  </tr>
  
  <tr>
  <td>REQ_INIT</td>
  
  <td>0x10</td>
  
  <td>Client</td>
  
  <td>New request.</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_CONTENT</td>
  
  <td>0x11</td>
  
  <td>Client</td>
  
  <td>Mine type and length</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_SCHEME</td>
  
  <td>0x12</td>
  
  <td>Client</td>
  
  <td>Scheme</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_AUTH</td>
  
  <td>0x13</td>
  
  <td>Client</td>
  
  <td>Authentication</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_HEADER</td>
  
  <td>0x14</td>
  
  <td>Client</td>
  
  <td>Header element</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_SERVER</td>
  
  <td>0x15</td>
  
  <td>Client</td>
  
  <td>server information</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_CLIENT</td>
  
  <td>0x16</td>
  
  <td>Client</td>
  
  <td>remote peer information</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>REQ_PROCEED</td>
  
  <td>0x1f</td>
  
  <td>Client</td>
  
  <td>process request</td>
  
  <td>Reponse elements, ASK_SSL, ASK_SSL_CLIENT or CBK_READ.</td>
  </tr>
  
  <tr>
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  </tr>
  
  <tr>
  <td>ASK_SSL</td>
  
  <td>0x43</td>
  
  <td>Server</td>
  
  <td>Request SSL information</td>
  
  <td>REP_SSL_NO, REP_SSL</td>
  </tr>
  
  <tr>
  <td>ASK_SSL_CLIENT</td>
  
  <td>0x44</td>
  
  <td>Server</td>
  
  <td>Request for CC</td>
  
  <td>REP_SSL_NO, REP_SSL_CERT</td>
  </tr>
  
  <tr>
  <td>REP_SSL_NO</td>
  
  <td>0x5f</td>
  
  <td>Client</td>
  
  <td>SSL information not available.</td>
  
  <td>Reponse elements.</td>
  </tr>
  
  <tr>
  <td>REP_SSL</td>
  
  <td>0x52</td>
  
  <td>Client</td>
  
  <td>SSL information.</td>
  
  <td>Reponse elements.</td>
  </tr>
  
  <tr>
  <td>REP_SSL_CERT</td>
  
  <td>0x53</td>
  
  <td>Client</td>
  
  <td>Client certificate.</td>
  
  <td>Reponse elements.</td>
  </tr>
  
  <tr>
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  </tr>
  
  <tr>
  <td>CBK_READ</td>
  
  <td>0x40</td>
  
  <td>Server</td>
  
  <td>Request for body data.</td>
  
  <td>CBK_DATA, CBK_DONE</td>
  </tr>
  
  <tr>
  <td>CBK_DATA</td>
  
  <td>0x41</td>
  
  <td>Client</td>
  
  <td>Chunk of data.</td>
  
  <td>CBK_READ or Reponse elements.</td>
  </tr>
  
  <tr>
  <td>CBK_DONE</td>
  
  <td>0x42</td>
  
  <td>Client</td>
  
  <td>End of data.</td>
  
  <td>Reponse elements.</td>
  </tr>
  
  <tr>
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  
  <td></td>
  </tr>
  
  <tr>
  <td>RES_STATUS</td>
  
  <td>0x20</td>
  
  <td>Server</td>
  
  <td>HTTP status.</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>RES_HEADER</td>
  
  <td>0x21</td>
  
  <td>Server</td>
  
  <td>response header.</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>RES_COMMIT</td>
  
  <td>0x2f</td>
  
  <td>Server</td>
  
  <td>send data to browser.</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>RES_BODY</td>
  
  <td>0x30</td>
  
  <td>Server</td>
  
  <td>data reponse element</td>
  
  <td>N/A</td>
  </tr>
  
  <tr>
  <td>RES_DONE</td>
  
  <td>0x3f</td>
  
  <td>Server</td>
  
  <td>end of reponse</td>
  
  <td>Request elements.</td>
  </tr>
  </table>
  </p>
  
  </section>
  
  <section  title="Type Details">
    <description>
      Packet Type Details
    </description>
  
  <p><br/><b>ERROR</b> 0x00
  <br/>Specifies an unrecoverable protocol error. After the client or the
  server issues this packet the socket underlying the WARP connection must
  be closed.
  <br/>This message can be sent at any time by the client or the server.
  <ul>
  <li>
  [string]: A detail message on why the connection must be closed.</li>
  </ul>
  </p><p>
  <b>DISCONNECT</b> 0xfe
  <br/>The client or the server is going to close the connection (no fatal
  protocol error).
  </p><p><b>FATAL</b> 0x0ff
  <br/>A protocol error occourred, the connection must be closed.
  <ul>
  <li>
  [string]: An error message.</li>
  </ul>
  </p><p>
  <b>CONF_WELCOME</b> 0x01
  <br/>The server issues this packet when a connection is opened. The server
  awaits for configuration information.
  <ul>
  <li>
  [ushort] Major protocol version.</li>
  
  <li>
  [ushort] Minor protocol version.</li>
  
  <li>
  [integer] The server unique-id.</li>
  </ul>
  </p><p>
  <b>CONF_DEPLOY </b>0x05
  <br/>The client attempts to deploy a web application.
  <ul>
  <li>
  [string] The application name.</li>
  
  <li>
  [string] The virtual host name.</li>
  
  <li>
  [ushort] The virtual host port.</li>
  
  <li>
  [string] The web-application URL path.</li>
  </ul>
  </p><p>
  <b>CONF_APPLIC</b> 0x06
  <br/>The server replies to a CONF_DEPLOY message with the web application
  identifier of the configured application.
  <ul>
  <li>
  [integer] The web application unique id for this server.</li>
  
  <li>
  [string] The web application real path (where it's expanded).</li>
  </ul>
  </p><p>
  <b>CONF_MAP</b> 0x07
  <br/>The client requests to the server to enumerate all mappings for a specified
  web-application. The server replies to this message with a serie of MAP_ALLOW
  and MAP_DENY packets, terminated by a MAP_DONE packet.
  <ul>
  <li>
  [integer] The web application unique id for this server.</li>
  </ul>
  </p><p>
  <b>CONF_MAP_ALLOW</b> 0x08:
  <br/>The server replies to a CONF_MAP message with those packets to indicate
  a mapping to a static page, or a resource that can be served autonomously
  by the remote end (the web server).
  <ul>
  <li>
  [string] An url-pattern as defined by the Servlet specification.</li>
  </ul>
  </p><p>
  <b>CONF_MAP_DENY</b> 0x09
  <br/>The server replies to a CONF_MAP message with those packets to indicate
  a mapping to a resource that must be served by the server (servlet container).
  <ul>
  <li>
  [string] An url-pattern as defined by the Servlet specification.</li>
  </ul>
  </p><p>
  <b>CONF_MAP_DONE</b> 0x0a
  <br/>The server replies to a CONF_MAP message with this packet to indicate
  that all servlet mappings have been successfully transfered to the other
  end.
  </p><p>
  <b>CONF_DONE</b> 0x0e
  <br/>Client issues this message when all configurations have been processed.
  </p><p><b>CONF_PROCEED</b> 0x0f
  <br/>Server issues this message in response to a CONF_DONE message, to acknowledge
  its readiness to accept requests.
  </p><p><b>REQ_INIT</b> 0x10
  <br/>The client requests to the WARP server that a request is about to be
  processed.
  <ul>
  <li>
  [integer] The web-application unique ID for this server. (From the
  CONF_MAP).</li>
  
  <li>
  [string] The HTTP method used for this request.</li>
  
  <li>
  [string] The request URI.</li>
  
  <li>
  [string] The request query arguments.</li>
  
  <li>
  [string] The request protocol (HTTP/1.0, HTTP/1.1...).</li>
  </ul>
  </p><p>
  <b>REQ_CONTENT</b> 0x11
  <br/>The mime content type and length of this request.
  <ul>
  <li>
  [string] The MIME content type of this reques.</li>
  
  <li>
  [integer] The content length of this request.</li>
  </ul>
  </p><p>
  <b>REQ_SCHEME</b> 0x12
  <br/>The scheme description of this request.
  <ul>
  <li>
  [string] The scheme (part before :// in the URL) of this request.</li>
  </ul>
  </p><p>
  <b>REQ_AUTH</b> 0x13
  <br/>Authentication information of the HTTP remote peer.
  <ul>
  <li>
  [string] The remote-user name.</li>
  
  <li>
  [string] The authentication information.</li>
  </ul>
  </p><p>
  <b>REQ_HEADER</b> 0x14
  <br/>An HTTP request header. There are severals.
  <ul>
  <li>
  [string] The header name.</li>
  
  <li>
  [string] The header value.</li>
  </ul>
  </p><p>
  <b>REQ_SERVER </b>0x15
  <br/>The HTTP server information.
  <ul>
  <li>
  [string] The HTTP server host name.</li>
  
  <li>
  [string] The HTTP server IP address.</li>
  
  <li>
  [ushort] The port receiving the HTTP request.</li>
  </ul>
  </p><p>
  <b>REQ_CLIENT</b> 0x16
  <br/>The HTTP client (remote peer) information.
  <ul>
  <li>
  [string] The HTTP client host name.</li>
  
  <li>
  [string] The HTTP client IP address.</li>
  
  <li>
  [ushort] The remote port originating the HTTP request.</li>
  </ul>
  </p><p>
  <b>REQ_PROCEED</b> 0x1f
  <br/>The client finished transmitting the request. The server can now proceed
  and process the request.
  </p><p>
  <b>ASK_SSL</b> 0x43
  <br/>The WARP server (Tomcat) asks the WARP client to transfer the basic
  SSL information (cypher, keysize and session).
  </p><p><b>ASK_SSL_CLIENT</b> 0x44
  <br/>The WARP server (Tomcat) asks the WARP server to transfer the client
  certificate. (just the first element of the chain and the webserver
  should request for it to the browser if possible).
  </p><p>
  <b>REP_SSL_CERT</b> 0x52
  <br/>The client certificate (remote peer).
  <ul>
  <li>
  [string] The client certificate. (PEM format).</li>
  </ul>
  </p><p>
  <b>REP_SSL</b> 0x53
  <br/>SSL information.
  <ul>
  <li>
  [string] The cipher_suite.</li>
  
  <li>
  [string] The ssl session. (That is not in the spec's).</li>
  
  <li>
  [ushort] size of the algorithm (56-128).</li>
  </ul>
  </p><p>
  <b>REP_SSL_NO</b> 0x5F
  <br/>The requested SSL information is not available.
  </p><p>
  <b>CBK_READ</b> 0x40
  <br/>A request callback. The WARP server queries the WARP client (HTTP
  server) to transmit a chunk of the request body.
  <ul>
  <li>
  [ushort] The max number of bytes the server is able to receive.</li>
  </ul>
  </p><p>
  <b>CBK_DATA</b> 0x41
  <br/>As requested by the WARP server, the WARP client (HTTP server) transmits
  a chunk of the request body.
  <ul>
  <li>
  [raw] A chunk of the request body.</li>
  </ul>
  </p><p>
  <b>CBK_DONE</b> 0x42
  <br/>The WARP client (HTTP server) informs the WARP server that the request
  body has been fully transmitted.
  </p><p>
  <b>RES_STATUS</b> 0x20
  <br/>The server replies with the HTTP response status for the request.
  <ul>
  <li>
  [ushort] The HTTP status of the response.</li>
  
  <li>
  [string] The HTTP response message.</li>
  </ul>
  </p><p>
  <b>RES_HEADER</b> 0x21
  <br/>An HTTP MIME response header to send to the client. There are severals
  of these.
  <ul>
  <li>
  [string] The MIME header name.</li>
  
  <li>
  [string] The MIME header value.</li>
  </ul>
  </p><p>
  <b>RES_COMMIT</b> 0x2f
  <br/>The server indicates that the first part of the response (HTTP status
  line and MIME headers) are to be committed to the client (remote peer).
  </p><p>
  <b>RES_BODY</b> 0x30
  <br/>The HTTP response body.
  <ul>
  <li>[raw] A chunk of the response body. Up to 65535 bytes.</li>
  </ul>
  </p><p>
  <b>RES_DONE</b> 0x3f
  <br/>The server finished transmitting the response.
  </p>
  
  </section>
  
  </document>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>