From: Christian R. <lil...@ce...> - 2002-10-08 12:28:32
|
Allen, This has been fixed with the following language: One cornerstone of SLCP is the variable length string. The format is '<kbd>ATTRIBUTE=n=STRING</kbd>', where <kbd>n</kbd> indicates the length of such a string. Though the attribute names are usually described in uppercase, they can appear in the protocol in any case. The rules for when a string is to be length prefixed are as follows: <ul> <li>If the string is directly user controlled, then it <b>MUST</b> be prefixed. <li>If the string is from a set which the server administrator can control, then it <b>MUST</b> be prefixed. <li>If the string is designed for direct display to the user, then it <b>MUST</b> be prefixed. <li>If the string serializes a list of arbitrary length, regardless of whether the delimiter is know, then it <b>MUST</b> be prefixed. <br> <li>If the value is an integer, float, or object number, then it should not be prefixed. <li>If the value is a string specified by the protocol itself, then it should not be prefixed (i.e. EVENT=eventname). </ul> If you should ever notice an attribute which fails to conform to these rules, please report it as an URGENT bug immediately. It is most certainly a mistake.<p> christian > User: [#121] prisoner > MOO: 1.8.1+g1+s > Core: lily running rev 2.6.2 > Server Time: Sun Aug 11 10:14:03 2002 EDT > ---%report%---- > The documentation for SLCP at > http://lilycore.sourceforge.net/Simple%20lily%20Client%20Protocol.html > documents that strings with a length attribute are good, and documents > their precise use. In command documentation, however, it illustrates > strings without a length attribute (for example, the %USER STATE > attribute). > Please clarify the documentation about the following: > - When can/will/may/must length-free variables be used? > - What flexability do parsers have in interpreting fields? Should/must > they allow length-free attributes when the spec has illustrated it > with a length and vice-versa? > - What flexability do generators have in creating fields? Must they > use the exact format given, can they be flexible in using "best > judgement" for when to use length and when not, or should they always > use length for non-numeric data? > > ---%report%---- > > |