On Thu, Jan 9, 2020 at 2:11 AM Sean Conner <sean at conman.org> wrote: > > It was thus said that the Great Michael Lazar once stated: > > - How do you respond to a request with a newline but no carriage return? > > I respond. I made CRs optional everywhere internally---it makes it easier > for me to test. Now, you did make one test labeled "RequestMissingCR" where > you did send a LF. Per the spec, I would expect this to return a 59 Bad > Request, but since I treat CRs as optional, that's why I passed that one. It's interesting to hear that this was intentional on your part. You're not alone on this, 3/5 servers that I tested didn't care about the CR at all. My own server does require the CR, but I didn't like writing it that way and felt like I had to jump through unnecessary hoops to conform to the specification: data = await self.reader.readuntil(b"\r\n") instead of the more straightforward: data = await self.reader.readline() I would prefer it if CR was optional. Similar to how <whitespace> is already defined as "any non-zero number of consecutive spaces or tabs". The same argument applies here. Content authors can't visually distinguish newline characters in text/gemini files, and I can't tell the difference in my terminal when I'm inspecting a gemini request. <newline> = [<CR>]<LF> - mozz
---
Previous in thread (3 of 4): 🗣️ solderpunk (solderpunk (a) SDF.ORG)