💾 Archived View for rawtext.club › ~sloum › geminilist › 000299.gmi captured on 2020-11-07 at 01:23:18. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

<-- back to the mailing list

Script to test gemini servers

Michael Lazar lazar.michael22 at gmail.com

Fri Jan 10 05:08:31 GMT 2020

- - - - - - - - - - - - - - - - - - - ```

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 notalone on this, 3/5 servers that I tested didn't care about the CR at all. Myown server does require the CR, but I didn't like writing it that way and feltlike 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 alreadydefined as "any non-zero number of consecutive spaces or tabs". The sameargument applies here. Content authors can't visually distinguish newlinecharacters in text/gemini files, and I can't tell the difference in my terminalwhen I'm inspecting a gemini request.

   <newline> = [<CR>]<LF>

- mozz