💾 Archived View for bbs.geminispace.org › s › Gemini › 22383 captured on 2024-12-17 at 15:08:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

Definitively can't pack entire documentation into my head:

must server append content mime type to all 20 status codes?

Or that is optional, and client should resolve content type by it extension (when not provided by server)

Posted in: s/Gemini

👻 ps

Dec 02 · 2 weeks ago

2 Comments ↓

🕹️ skyjake [mod...] · Dec 02 at 12:26:

Yes, responses with status code 20 need to include the MIME type of the content. The specification does not make that optional.

The client is not expected to make any guesses based on file extension. That wouldn't even work in cases where the URL has no extension.

I've seen some (old? broken?) server implementations that send a plain "20 " as a response, which has led me to fall back to a default MIME type of "text/gemini; charset=utf-8" in Lagrange, but it's perfectly acceptable for a client to reject such responses as invalid, IMO.

👻 ps [OP] · Dec 02 at 12:36:

Agreed, if that's not my specification misunderstand, will not apply any extra action on client side so, but make some notice and maybe append binary download option at this moment. Thanks for confirmation!