diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-12 16:32:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-12 16:32:56 -0400 |
commit | 9c27f56cd9537d46c8d3acebf3ef37ff43b5c03b (patch) | |
tree | 7495f5610f2bda94db6b44648cc55a9cbfdbffda /doc | |
parent | 6ff67389631100d076482e573859d0f8f85255ac (diff) | |
download | tor-9c27f56cd9537d46c8d3acebf3ef37ff43b5c03b.tar.gz tor-9c27f56cd9537d46c8d3acebf3ef37ff43b5c03b.zip |
Fix torrc-format documentation corner cases
We don't require that the final line be terminated, and we open
windows torrc files in text mode.
Closes ticket 22795.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/torrc_format.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/torrc_format.txt b/doc/torrc_format.txt index b175b9fb15..7a4a92a663 100644 --- a/doc/torrc_format.txt +++ b/doc/torrc_format.txt @@ -18,9 +18,10 @@ does, not what it should do. ; specified in RFC5234. ; A file is interpreted as every Entry in the file, in order. - TorrcFile = *Line + TorrcFile = *Line [ UnterminatedLine ] - Line = BlankLine / Entry + Line = BlankLine LF / Entry LF + UnterminatedLine = BlankLine / Entry BlankLine = *WSP OptComment LF BlankLine =/ *WSP LF @@ -69,6 +70,12 @@ does, not what it should do. ; Anything besides NUL and LF NonLF = %x01-%x09 / %x0b - %xff + ; Note that on windows, we open our configuration files in "text" mode, + ; which causes CRLF pairs to be interpreted as LF. So, on windows: + ; LF = [ %x0d ] %x0a + ; but everywhere else, + LF = %0x0a + OCTDIG = '0' - '7' KC = Any character except an isspace() character or '#' or NUL |