💾 Archived View for gemi.dev › gemini-mailing-list › 000440.gmi captured on 2024-05-26 at 15:57:08. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-12-28)

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

Default document for root

1. Garrit Franke (garritfranke (a) gmail.com)

Hi,

I'm currently in the midst of writing a gemini server, and stumbled
upon presumably undefined behavior in the specification: What file
should be served when requesting "/", or any directory?

I tried it out on several servers using index.gmi, and sure enough
this seems to be the accepted case. However, this is not part of the
specification. Maybe I overlooked something, or this is intentional?
Otherwise, it would be nice to have a small hint to this in the spec.

Thanks for making gemini great!

Regards
Garrit

Link to individual message.

2. Philip Linde (linde.philip (a) gmail.com)

On Fri, 6 Nov 2020 10:21:43 +0100
Garrit Franke <garritfranke at gmail.com> wrote:

> I'm currently in the midst of writing a gemini server, and stumbled
> upon presumably undefined behavior in the specification: What file
> should be served when requesting "/", or any directory?

Hi Garrit,

This is an implementation detail that the protocol specification should
not be concerned with; which file exactly you choose to serve for any
given path (if a file at all) has no bearing on the implementation of
the protocol.

It is however somewhat touched on in the best practices document, at
least if you consider "/" a directory:
gemini://gemini.circumlunar.space/docs/best-practices.gmi

-- 
Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201106/7c12
d235/attachment.sig>

Link to individual message.

3. Jason McBrayer (jmcbray (a) carcosa.net)

Garrit Franke <garritfranke at gmail.com> writes:

> I tried it out on several servers using index.gmi, and sure enough
> this seems to be the accepted case. However, this is not part of the
> specification. Maybe I overlooked something, or this is intentional?
> Otherwise, it would be nice to have a small hint to this in the spec.

This is server-defined behavior ? how a server maps URLs to files, and
how a server determines the MIME-type of a file, etc. are all up to the
server author. This is the same as with http, actually; it's just that
the conventions for http servers have been established for so long that
we forget they're not part of the standard.

Anyway, the convention for a directory appears to be: serve either
index.gmi or index.gemini if they exist; serve a directory listing if
they don't. But it's perfectly reasonable for a server to not do this,
or make it configurable behavior, etc.

-- 
Jason McBrayer      | ?Strange is the night where black stars rise,
jmcbray at carcosa.net | and strange moons circle through the skies,
                    | but stranger still is lost Carcosa.?
                    | ? Robert W. Chambers,The King in Yellow

Link to individual message.

4. Sean Conner (sean (a) conman.org)

It was thus said that the Great Garrit Franke once stated:
> Hi,
> 
> I'm currently in the midst of writing a gemini server, and stumbled
> upon presumably undefined behavior in the specification: What file
> should be served when requesting "/", or any directory?
> 
> I tried it out on several servers using index.gmi, and sure enough
> this seems to be the accepted case. However, this is not part of the
> specification. Maybe I overlooked something, or this is intentional?
> Otherwise, it would be nice to have a small hint to this in the spec.

  As others have mentioned, it's a server implementation detail.  The two
popular conventions are:

	index.gemini
	index.gmi

  I know for my own server, GLV-1.12556, you can configure the basename
('index') and extension ('.gemini') to be anything you want.  So if I wanted
to, I could change the default of 'index.gemini' to 'guide.html'.

  -spc

Link to individual message.

---

Previous Thread: Caching and status codes

Next Thread: [ANN] Gemini feed expanding proxy