MCP request syntax

Input and output to and from client and server is presumed to be divided into records (called `lines' hereafter).

An MCP request is of the general form:


  #$#<request-name>[*][ <auth-key>][ <keyword>: <value>]...

 

"#$#" must be the first three characters in the line.

<request-name> is a string of one or more printable ASCII characters. It may not contain spaces, double-quotes, backslashes or asterisks.

Proposal: require <request-name> to start with a letter. This reserves a substantial part of the namespace for private out-of-band protocols, or other protocol extensions.

<auth-key> is a string of one or more printable ASCII characters. It may not contain spaces, double-quotes, colons or backslashes.

<keyword> is a string of one or more printable ASCII characters. It may not contain spaces, double-quotes, colons, or backslashes.

<value> is

Note that the empty string must be quoted. Also, the ASCII TAB character is not allowed in <value>s, at all.

Proposal: disallow unquoted <value>s with colons in them. This is not strictly necessary, but it could detect some bugs in MCP request generators.

If the asterisk after <request-name> is present, this line starts a `multi-line request'. Zero or more lines of data associated with the request follow, prepended with "@@@". These lines are terminated with a single line of the form "#$#END".

Note that the 1.7.7 LambdaMOO server cannot properly handle multi-line requests sent by a client if OUT_OF_BAND_PREFIX is defined as "#$#".

Proposal: multi-line requests, in their current form, should be deprecated in favor of some other construct providing this functionality.