gemini+submit:// (was Re: Uploading Gemini content)

Sean Conner sean at conman.org
Sun Jun 14 03:11:59 BST 2020


It was thus said that the Great Petite Abeille once stated:
> > On Jun 13, 2020, at 22:56, solderpunk <solderpunk at SDF.ORG> wrote:
> > 
> >  Nothing extra needed in the protocol at all!
> 
> Considering the various network topology hurdles along the way, perhaps
> the gemini protocol itself could facilitate such a role reversal by
> offering a way to initiate such switch.

  Such a thing would require a new response code block, like 70 (for
UPLOAD---INPUT is inadiquate for this).  Basic servers can then ignore this
block like they can ignore client certificates.  It would also require
knowing of the upload link, but I think that can be solved using
pre-existing measures (link titles, well-known links, etc.).

  Here's a simple proposal:

C: gemini://example.com/post-endpoint CRLF
S: 70 Proceed with upload CRLF
C: - 1234 text/plain; charset=us-ascii CRLF
C: data ...
S: 2x / 3x / 4x / 5x CRLF

C: gemini://example.com/put-endpoint CRLF
S: 71 Proceed with new resource CRLF
C: gemini://example.com/path/to/new/resource 1234 text/plain; charset=us-ascii CRLF
C: data ...
S: 31 gemini://example.com/path/to/new/resource CRLF

  For the seond method, a size of 0 means to delete the resource.  I made
the client response the same way to both to simplify the implementation. 
There is a semantic difference between a generic UPLOAD and the replacement
of an existing resource on the server, thus the two codes.

  A case could be made of making the size and mime type query parameters to
the endpoint---that would allow the server to check the proposed type and
sizes and reject before the upload starts.  In that case, I would propose
this:

C: gemini://example.com/post-endpoint?size=1234&mime=text/plain;charset=us-ascii CRLF
S: 70 Proceed with upload CRLF
C: data ...
S: 2x / 3x / 4x / 5x CRLF

C: gemini://example.com/put-endpoint?size=1234&mime=text/plain;charset=us-ascii CRLF
S: 71 Proceed with new resource CRLF
C: gemini://example.com/path/to/new/resource CRLF
C: data ...
S: 31 gemini://example.com/path/to/new/resource CRLF

  Depending upon the CGI implementation, this could even be handled via CGI
rather than the server.

  -spc
  


More information about the Gemini mailing list