A bigger problem is when the liberal implementations become the de-facto standard.
Postel’s Principle is a Bad Idea
11–20 of 62 posts
Re: Postel’s Principle is a Bad Idea
#12Re: Postel’s Principle is a Bad Idea
#13Earlier quoted context omitted.
Postel wrote it in 1980. (First found in RFC760[1]) Since then we've had computer viruses, worms, and other malware; we've had hackers, crackers, spies, criminals, and semi-competent people flooding the Internet; we have people not just making accidental requests but fuzzing and fusking to try to break things or bypass controls. It's a great principle for the human stuff, but it feels really outdated for technical st…
I agree, Postel's principle makes a lot of sense in context, if you view it as a bunch of mostly good-faith people attempting to bootstrap communication in a new medium. Then it's clear that to get things working, you want to forgive errors on the receiving side (to the extent you can do so), but send as clean and unproblematic output as you can. Basically what a sensible, not-anally-bureaucratic human who's trying t…
Re: Postel’s Principle is a Bad Idea
#14They even use the phrase "infer" in several places, encouraging systems to take obviously malformed packets and try to figure out what they meant.
Being liberal in accepting input, apart from security issues, seems to create a worse situation. Implementation A messes up something, but B seems to be OK with it. C then accidentally requires it, while D rejects it. Depending on how large and responsive the vendors behind those implementations are, you end up with a nasty state of affairs, with random hacks here and there.
It's hard enough to create unambiguous, comprehensible, specifications. Telling implementations to be liberal only makes it worse.
Re: Postel’s Principle is a Bad Idea
#15For example, if you have a set of unused flag bits documented as "reserved, must be zero", then a receiver that silently ignores non-zero bits allows senders that erroneously set those bits to propagate. This is fine, until one day in a future standard you want to define new behaviour for one of those bits, and find you can't - because there's large numbers of senders out there that erroneously set it but don't have any idea about the new behaviour.
Re: Postel’s Principle is a Bad Idea
#16I'd be more interested in reading a paper called How JSON escaped Postel's Principle which included discussion on the ambiguity being pushed to other areas, such as date parsing.
Re: Postel’s Principle is a Bad Idea
#17Re: Postel’s Principle is a Bad Idea
#18Re: Postel’s Principle is a Bad Idea
#19Postel's Principle was very important for bootstrapping adoption of TCP/IP, but it's mostly a curse in mature systems. It doesn't even help new implementors; instead, it deceives them into thinking that they've achieved interoperability when instead they've accidentally built dependencies on other people's implementation details. That said, I wouldn't suggest that our Insertion, Evasion paper presented an argument re…
when instead they've accidentally built dependencies on other people's implementation details I think it would be very interesting if you could give an example or two of this.
Vendor A writes a parser that is helpful and is liberal and infers missing quotes and stuff. Vendor B writes something that's mostly to spec, but accidentally doesn't properly quote things. It works fine, because A is liberal and infers these quotes.
Vendor C comes along and builds exactly to spec. But despite being perfectly to spec, it doesn't interop because B sends invalid data! But B is a big vendor, and their stuff works with A.
So now C must add a hack to their parser to deal with the fact that, because A was liberal, B got their implementation wrong.
One example is the loose routing parameter, "lr". It has no value, you just add the name of the parameter "uri;lr" in contrast to other parameters like "tag=bla". Some implementations send "lr=on", and that should be mostly harmless. Except other implementations take that to mean "lr" has a value, and no longer accept just "lr" as turning the feature on.
SIP is full of these things, many of them in the parsing layer alone, let alone actual semantics of what things mean. Browsers are another example: vendor A decides to allow closing tags out of order - how do you do handle such unspecified stuff cross browser?
Re: Postel’s Principle is a Bad Idea
#20Browser tolerance for HTML errors is one of the main reasons the web took off so fast.
But that exact behaviour, trying to infer intent, meant that tons of unspecified behaviour had to be added to all browsers to try to mimic which each one did to handle totally invalid cases.
So, even if leniency did make it easier to create a web page, it also contributed greatly to the already difficult task of creating consistent cross-browser rendering.
Look at JavaScript, and the recent semi-colon debacle with Bootstrap and some other tool. Having "implementer defined" leniency just means you'll get multiple interpretation and problems.