4 ms·
> caches SHOULD first normalize request content to remove semantically insignificant differences, thereby improving cache efficiency This feels like a bad idea
by jasonhansel 5y ago
> caches SHOULD first normalize request content to remove semantically insignificant differences, thereby improving cache efficiency
This feels like a bad idea, since (a) different caches will support different content types and normalize them in different ways, leading to unexpected changes in behavior and (b) some servers may behave differently depending on something that a cache considers to be a "semantically insignificant" distinction. I'm not sure, in other words, if I trust caches to get this right.
It seems like it might be better to require clients to submit requests in a "pre-canonicalized" form, or to have caches allow this behavior but disable it by default.
- mjevans 5y agoThis is what I would like to see as a logical conclusion that is future proof: The query and response MUST be transmitted and stored 'as is' (a sequence of octets). The query and response SHOULD be encoded in either UTF-8 or WTF-8 https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/ Future standards or non-standard systems MAY use different encodings; conformant implementations MUST NOT alter the sequence of bytes. They MAY perform a validation check and add additional headers.
- progval 5y agoFrom your link: > WTF-8 must not be used to represent text in a file format or for transmission over the Internet.
- mjevans 5y agoIt's eventually going to be anyway. This is a problem that isn't limited to Rust and single hosts. Also, as per the rest of my ideal solution, the true encoding is: Sequence of Octets / Bytes
- dragonwriter 5y agoSequence of octets isn't an encoding, and content-aware intermediaries need to know the actual encoding.