Clarifications to the Spec
Johann Galle
johann.galle at protonmail.com
Wed Nov 11 15:47:42 GMT 2020
> - Is it valid for META to contain the line feed character?
> 10 Is\nThis\nValid?\r\n
As it stands, it should be legal because \n can be distinguished from \r\n. But
I think not many clients are as strictly written to the spec as to handle this
correctly, most would probably consider the meta ended after the first \n.
My personal opinion is that it should not be allowed and that the line ending
should be just \n, but maybe this is a use case that was considered when writing
the gemni spec?
> - Is it valid for META to be empty?
I do not see a reason why it should never be allowed to be empty from the spec.
It only states a max length of 1024 bytes and UTF-8 encoding. (§3.1)
In some cases I would consider it illegal in context with 3x status codes.
Reasonable behaviour of a client for empty META would be IMHO:
┌──┬───────────────────────────────────────────────────────────────────────────┐
│1x│Display as normal, but the user gets no message. This might look strange, │
│ │but that is something the particular server admin should fix, not gemini. │
├──┼───────────────────────────────────────────────────────────────────────────┤
│2x│Assume a default MIME type of text/gemini. │
├──┼───────────────────────────────────────────────────────────────────────────┤
│3x│This should be a hard error, the sentence in §3.2.3 might be rephrased as: │
│ │"<META> MUST be a new URL for the requested resource." │
├──┼───────────────────────────────────────────────────────────────────────────┤
│4x│Show a default error message, which might be based on the exact status code│
│5x│ │
├──┼───────────────────────────────────────────────────────────────────────────┤
│6x│No difference, META is only informational. │
└──┴───────────────────────────────────────────────────────────────────────────┘
> - Should servers be required to send TLS close_notify?
I think it has been laid out that this is included in the TLS spec and thus it
is non-optional. Also, the spec explicitly states that the server closes the
connection which - with TLS - includes sending close_notify.
More information about the Gemini
mailing list