N
N
Nicholas Kim2014-08-12 12:29:25
Computer networks
Nicholas Kim, 2014-08-12 12:29:25

Gopher: how to give away text documents correctly?

I'm writing a Gopher server for my own interest.
When reading RFC 1436 , the question arose: how to transfer text correctly?

The well-tempered server ought to send "text" (unless a file must be transferred as raw binary). Should this text include tabs, formfeeds, frufru? Probably not, but rude servers will probably send them anyway.

If you look at the formal description of the protocol in the application, then everything seems to be clear: text, then `.` from a new line, and finally `CR-LF`. Why then is it separately said that it is impossible to transfer “tabs, formfeeds” and some “frufru”?
TextFile  ::= {TextBlock} Lastline
TextBlock ::= Block of ASCII text not containing Lastline pattern.
Lastline  ::= '.'CR-LF.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
throughtheether, 2014-08-12
@Yaruson

If you look at the formal description of the protocol in the application, then everything seems to be clear: text, then `.` from a new line, and finally `CR-LF`. Why then is it separately said that it is impossible to transfer "tabs, formfeeds" and some "frufru"?
Because, apparently, it is assumed that the server can transmit all sorts of delights ('frufru'). The server can do this because it hasn't been banned. The server was not banned because this RFC is not a standard (first page):
how to send text documents?
If I were you, I would act in accordance with the maxim "Be conservative when sending data, and liberal when receiving data."

V
Valentin, 2014-08-12
@vvpoloskin

Take the already written server and see the information you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question