URI or URL?
Hi. So I was writing a titan-capable server and I kinda tripped over the standards a little bit.
The gemini standard mentions the URI standard (RFC3986) and so does the titan standard when talking about parameters, but those standards (AFAIK) don't allow the kind of parameters used in most titan servers and clients I could find.
The form 'titan://host/path;mime=text/plain', as a RFC3986 URI, would point to the file 'plain' in 'path;mime=text'. What everybody uses is a RFC1808 URL, where ';' separates a path from object parameters. So either the gemini standard needs to clarify the parameter syntax or clients and servers need to percent-encode the mime-type and token.
Maybe I'm too pedantic.
Sep 25 ยท 3 weeks ago
2 Comments โ
โ๏ธ gim ยท Sep 25 at 21:49:
No.
Afair Gemini itself does not mention uri (sub)components in any way. So from Gemini pov - yes the path should be parsed as as you've described.
Titan spec however, defines right at the beginning parameters and uses reserved ';' for this purpose. (parameters processing/removal obviously happens before any path processing).
How subcomponents should be handled is protocol-specific, and I believe std66 says that.
otoh. titan defines parameters as key value pairs, but MIME type (aka media type) itself can have parameters... and it is also using ';' to separate them. so yeah I guess that mime type params simply are not allowed ๐
๐ skyjake [mod...] ยท Sep 26 at 03:30:
yeah I guess that mime type params simply are not allowed
The Titan specification indeed does not mention anything about escaping `;` in parameter values, so one should probably avoid using that character. The typical solution here is to percent-encode those in the value strings, and the server would have to decode the values after splitting the pairs. This would be a worthwhile clarification to add in the Titan specification, I suppose.
Source