diff options
Diffstat (limited to 'spec/control-spec/message-format.md')
-rw-r--r-- | spec/control-spec/message-format.md | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/control-spec/message-format.md b/spec/control-spec/message-format.md index 2e3115b..5a1a6ad 100644 --- a/spec/control-spec/message-format.md +++ b/spec/control-spec/message-format.md @@ -13,7 +13,7 @@ We use the following nonterminals from RFC 2822: atom, qcontent We define the following general-use nonterminals: -QuotedString = DQUOTE *qcontent DQUOTE +QuotedString = DQUOTE \*qcontent DQUOTE There are explicitly no limits on line length. All 8-bit characters are permitted unless explicitly disallowed. In QuotedStrings, @@ -28,13 +28,13 @@ Controllers SHOULD always send CRLF. ### Notes on an escaping bug -CString = DQUOTE *qcontent DQUOTE +CString = DQUOTE \*qcontent DQUOTE Note that although these nonterminals have the same grammar, they are interpreted differently. In a QuotedString, a backslash followed by any character represents that character. But -in a CString, the escapes "\n", "\t", "\r", and the octal escapes -"\0" ... "\377" represent newline, tab, carriage return, and the +in a CString, the escapes "\\n", "\\t", "\\r", and the octal escapes +"\\0" ... "\\377" represent newline, tab, carriage return, and the 256 possible octet values respectively. The use of CString in this document reflects a bug in Tor; @@ -101,11 +101,11 @@ Tor to the controller are guaranteed to share the same status code. Specific replies are mentioned below in section 3, and described more fully in section 4. -[Compatibility note: versions of Tor before 0.2.0.3-alpha sometimes -generate AsyncReplies of the form "*(MidReplyLine / DataReplyLine)". +\[Compatibility note: versions of Tor before 0.2.0.3-alpha sometimes +generate AsyncReplies of the form "\*(MidReplyLine / DataReplyLine)". This is incorrect, but controllers that need to work with these versions of Tor should be prepared to get multi-line AsyncReplies with -the final line (usually "650 OK") omitted.] +the final line (usually "650 OK") omitted.\] <a id="control-spec.txt-2.4"></a> @@ -132,13 +132,13 @@ CRLF = CR LF ; The tokens that implement the above follow: ServerSpec = LongName / Nickname -LongName = Fingerprint [ "~" Nickname ] +LongName = Fingerprint \[ "~" Nickname \] ; For tors older than 0.3.1.3-alpha, LongName may have included an equal ; sign ("=") in lieu of a tilde ("~"). The presence of an equal sign ; denoted that the OR possessed the "Named" flag: -LongName = Fingerprint [ ( "=" / "~" ) Nickname ] +LongName = Fingerprint \[ ( "=" / "~" ) Nickname \] Fingerprint = "$" 40*HEXDIG NicknameChar = "a"-"z" / "A"-"Z" / "0" - "9" @@ -167,7 +167,7 @@ Address = ip4-address / ip6-address / hostname (XXXX Define these) CmdData = *DataLine "." CRLF DataLine = CRLF / "." 1*LineItem CRLF / NonDotItem *LineItem CRLF LineItem = NonCR / 1*CR NonCRLF -NonDotItem = NonDotCR / 1*CR NonCRLF +NonDotItem = NonDotCR / 1\*CR NonCRLF ; ISOTime, ISOTime2, and ISOTime2Frac are time formats as specified in ; ISO8601. @@ -178,8 +178,8 @@ IsoDatePart = 4*DIGIT "-" 2*DIGIT "-" 2*DIGIT IsoTimePart = 2*DIGIT ":" 2*DIGIT ":" 2*DIGIT ISOTime = IsoDatePart " " IsoTimePart ISOTime2 = IsoDatePart "T" IsoTimePart -ISOTime2Frac = IsoTime2 [ "." 1*DIGIT ] +ISOTime2Frac = IsoTime2 \[ "." 1\*DIGIT \] ; Numbers LeadingDigit = "1" - "9" -UInt = LeadingDigit *Digit +UInt = LeadingDigit \*Digit |