Remix.run Logo
jmull 4 days ago

> ...tragedy of following Postel's Law.

The "law" is: "Be liberal in what you accept, and conservative in what you send."

But here the problem is caused by being liberal in what is sent while being more conservative in what is accepted. It's using invalid characters in the cookie value, which not everything can handle.

Following Postel's law would have avoided the problem.

rcxdude 4 days ago | parent [-]

Postel's law is the main reason why there are so many cases where something is being liberal in what it sends. It's a natural approach when trying to enter into an existing ecosystem, but when the whole ecosystem follows it you get a gigantic ball of slightly different interpretations if the protocol, because something that is non-compliant but happens to work with some portion of the ecosystem won't get discovered until it's already prevalent enough it now needs to be accounted for by everyone, complexifying the 'real' spec and increasing the likelihood someone else messes up what they send.

jmull 3 days ago | parent [-]

I don't think you can blame postel's law for people not following it.

> when the whole ecosystem follows it you get a gigantic ball of slightly different interpretations

You're describing the properties of a long-lived, well-used, well-supported, living system. We'd all like the ecosystems we have to interact with to be consistent and well-defined. But even more importantly, we'd like them to exist in the first place. Postel's law lets that happen.

If your app is a leaf node in the ecosystem, and it's simple enough that you have direct control over all the parts of your app (such that you can develop, test, and release updates to them on a unified plan/timeline), then, yes, fail-early pickiness helps, because the failures happen in development. Outside of that you end up with a brittle system where the first place you see many failures is in production.

rcxdude 2 days ago | parent [-]

I think you can blame Postel's law for being self-defeating. If the whole ecosystem is conservative in what it accepts, the whole ecosystem will be conservative in what it sends (because otherwise it won't be part of it). If the whole ecosystem is liberal in what it accepts (or just a significant part of it), some parts of it will be liberal in what it sends (because not everyone is going to rigidly follow the spec once they get something working well enough for the parts they test with), and that's where the problem comes from.