💾 Archived View for lists.flounder.online › gemini › threads › 20211026092009.GA26561@host.gmi captured on 2022-07-16 at 16:22:33. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

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

[spec] Undefined status codes

[spec] Undefined status codes

From: neruvi[at]disroot[dot]org@

Date: Tue, 26 Oct 2021 09:20:09 +0000

Message-Id: 20211026092009.GA26561@host

To: "Gemini mailing list" <gemini@lists.orbitalfox.eu>

Reply

Export

--------------------------------------

I am writing a REST API for Gemini and need to have more than one status

code coupled with a response body (to parallel the 409 response in

Convergence's Notary protocol [1]). Only 2x status codes allow for

response bodies, and the only defined 2x status code is 20. No problem,

I thought. The second digit is optional, so gemini clients and

libraries should accept any 2x status code and treat unknown ones as 20.

Right? Well, not in practice. The clients I tested treat the request

as failed if the status code begins with 2 but is anything other then

20.

Let's clarify what the behavior of clients ought to be. I think this

makes the most sense:

1-6, the client must handle it as though the second digit were 0;

than 1-6, the client must consider it invalid (of course).

I also opened an issue on Gitlab for this, see [2].

[1] https://github.com/moxie0/Convergence/wiki/Notary-Protocol#409

[2] https://gitlab.com/gemini-specification/protocol/-/issues/43

Re: [spec] Undefined status codes

From: gemini@bunburya.eu

Date: Tue, 26 Oct 2021 10:23:32 +0100

Message-Id: c5c116cf-c1ac-4ac0-8ffc-3d34c0b8c848@bunburya.eu

To: <gemini@lists.orbitalfox.eu>

In-Reply-To: 20211026092009.GA26561@host

Reply

Export

--------------------------------------

Sorry if I'm missing something but is this not already clearly set out in the spec?

A client SHOULD deal with undefined status codes
between '10' and '69' per the default action of the initial digit. So a
status of '14' should be acted upon as if the client received a '10'; a
status of '22' should be acted upon as if the client received a '20'.

Re: [spec] Undefined status codes

From: neruvi[at]disroot[dot]org@

Date: Tue, 26 Oct 2021 09:38:23 +0000

Message-Id: 20211026093823.GA29015@host

To: "Alan" <gemini@bunburya.eu>

In-Reply-To: c5c116cf-c1ac-4ac0-8ffc-3d34c0b8c848@bunburya.eu

Cc: <gemini@lists.orbitalfox.eu>

Reply

Export

--------------------------------------

On Tue, 2021-10-26, Alan wrote:

Sorry if I'm missing something but is this not already clearly set out
in the spec?
> A client SHOULD deal with undefined status codes
> between '10' and '69' per the default action of the initial digit. So a
> status of '14' should be acted upon as if the client received a '10'; a
> status of '22' should be acted upon as if the client received a '20'.

Ah, you're right, Sean took care of this [1]. Completely missed it.

This text is not on gemini.circumlunar.space, though.

Developers, take note.

https://gitlab.com/gemini-specification/protocol/-/blob/master/specification.gmi#L229