💾 Archived View for rawtext.club › ~sloum › geminilist › 001649.gmi captured on 2020-09-24 at 01:44:31. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

<-- back to the mailing list

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 (forUPLOAD---INPUT is inadiquate for this). Basic servers can then ignore thisblock like they can ignore client certificates. It would also requireknowing of the upload link, but I think that can be solved usingpre-existing measures (link titles, well-known links, etc.).

Here's a simple proposal:

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

C: gemini://example.com/put-endpoint CRLFS: 71 Proceed with new resource CRLFC: gemini://example.com/path/to/new/resource 1234 text/plain; charset=us-ascii CRLFC: 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 madethe client response the same way to both to simplify the implementation. There is a semantic difference between a generic UPLOAD and the replacementof an existing resource on the server, thus the two codes.

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

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

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

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

-spc