Explanation and notation

    The XWeb communication protocol specifies a communication mechanism between XWeb clients and XWeb servers.  Servers may act as clients to support a redundant distributed information system, and a client may act as a server to allow for pushed updates to occur.

Meta symbols used throughout this specification

<SP> Space ASCII character 32 decimal.
<CR> Carriage return ASCII character 13 decimal.
<LF> Line feed ASCII character 10 decimal.

<mime type> Any type defined in RFC 2046
<Header>      See below
<Body>         See below

Notation

    Anything between square brackets [] or parenthesis () is optional.

Request format

METHOD <SP> <Parameter> <SP> <Protocol> <CR> <LF>
<Headers>
<CR><LF>
[<Body>]
    All method invocations are to be upper case.  The "Parameter" is most often a XLoc, but occasionally an URL or XQL request.  Protocol should be "XWEB/0.1" other values are reserved for future use.  Also note that legacy clients may make requests with other protocols ("HTTP/1.0", "HTTP/1.1", etc.)

    A <Header> consists of zero or more header fields with values followed by a <CR><LF> pair.  A <CR> <LF> pair without a header field terminates the header.

    A <Body> consists of zero or more bytes of information.

Response format

Immediately following a complete request, the server should return a response
<Protocol> <SP> <Status Code> <SP> <Text response>
<Header>
<CR><LF>
[<Body>]
    The protocol should be the minimum of the servers protocol version and the clients protocol version (i.e. if the client requests a XWeb/0.2 and the server only supports XWeb/0.1 the server should send a response with XWeb/0.1).  Header and Body are the same as a request.
 

Method mechanism diagram notation

    Each method in the specification provides a Method mechanism diagram describing the interaction between the server and the client.  The symbol ">>To Server" indicates the following text is sent from the client to the server, and "<<To Client" indicates the information is sent from the server to the client.  The header fields in parenthesis indicate optional header fields, and header fields without parenthesis indicate required header fields.  <Protocol> is assumed to be "XWEB/0.1" for this specification.  Although all diagrams show a "200 OK" response being returned any method may return an error or information response instead.  See the result codes section for more information.

Examples

    Examples that describe the transaction between the server will use the following notation.  All data sent between the client and the server will be indented.  The symbol ">>To Server" will not be indented, as well as "<<To Client".  The end of communication is marked by a non-indented ".".