-1

Some decades ago working with IRC, I remember a paragraph of some RFC and now I'm looking for it. I don't remember it by memory, only a concept:

When it comes to communication between two services, the server issuing the information must be gentle upon receiving the request, so that it can accept the sender's query without problems, but respond strictly so that its response is clear.

Thanks in advance for any help or quote.

1 Answer 1

2

RFC 761 Transmission Control Protocol, Section 2.10 "Robustness principle":

TCP implementations should follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others.

See the corresponding Wikipedia article for more.

6
  • perfect!!! that was I was looking for, thanks a lot Philip, have a great day. I will accept your answer afther the request time by SE Commented Feb 24, 2023 at 21:19
  • This principle doesn't always work, by the way. Commented Feb 24, 2023 at 21:29
  • @user253751 it would work if people applied it Commented Feb 24, 2023 at 22:56
  • 1
    @LeandroBardelli Not really. They tried that, and the problem it causes, is that everyone has a different idea of "liberal what you accept" means, and because nobody is strict, it's easy for your version to not be conservative in what it does, and you will never realize, until just by coincidence, your liberal-ness in what you do doesn't line up with the other computer's liberal-ness in what it accepts. It's impossible to make sure every computer works with every other. Best practice now is to be very careful about precisely what's allowed and what isn't. Commented Feb 24, 2023 at 23:03
  • Yes, completely agree with @user253751. The robustness principle asks an endpoint to silently substitute some unseen default value if client neglected to supply it. Current best practice is for server to offer an annoying 400 error, so that authors of the client code will immediately notice the lossage, making it likely that the bug will get fixed prior to release. Of course, the server can only be "correct" w.r.t. some published specification of server's behavior. Inevitably it will change, so we rely on SemVer to coordinate client and server versions. Commented Feb 25, 2023 at 3:49

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.