💾 Archived View for gemini.conman.org › gRFC › 0003 captured on 2020-11-07 at 00:45:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

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

Subject: Response header to include optional file size in reply

From: Sean Conner <sean@conman.org>

Date: Thu, 1 Aug 2019

Content-Type: text/gemini; charset=US-ASCII; format=flowed

Status: PROPOSED

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",

"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and

"OPTIONAL" in this document are to be interpreted as described in BCP 14

[RFC2119] [RFC8174] when, and only when, they appear in all capitals, as

shown here.

The current response header from Gemini is defined as:

; ABNF from [RFC5234]

status-header = status HTAB meta CRLF

status = DIGIT

meta = *(VCHAR / SP)

DIGIT = %x30-39 ;'0' - '9'

HTAB = %x09

CRLF = CR LF

CR = %x0D

LF = %x0A

SP = %x20

VCHAR = %x21-7E

This limits the ability of the client to determine if the entire file

requested was sent, solely relying upon the underlying transport to ensure

the entire file was sent. An error (or malicious act) that caused the

connection to close early might not be detected by the client, leaving the

downloaded file unknowingly incomplete. A Gemini server could include an

optional size a successful response that can aid the client in knowing it

has the entire file. The updated ABNF for the response header is:

status-header = status HTAB meta [HTAB size] CRLF

status = "2" -- success header

meta = *(VCHAR / SP)

size = 1*DIGIT ; represents size of file in octets

DIGIT = %x30-39 ;'0' - '9'

HTAB = %x09

CRLF = CR LF

CR = %x0D

LF = %x0A

SP = %x20

VCHAR = %x21-7E

References

[RFC2119]

[RFC5234]

[RFC8174]