💾 Archived View for rawtext.club › ~sloum › geminilist › 002230.gmi captured on 2020-09-24 at 01:20:49. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Paul Boyd boyd.paul2 at gmail.com
Fri Jul 17 13:21:35 BST 2020
- - - - - - - - - - - - - - - - - - -
Hello all,
I was excited to learn about Gemini recently. I ported some web content ofmine over (gemini://pboyd.io), and I've been enjoying looking throughwhat's out there.
The Gemini sites (err.. capsules?) remind me of the web in another era, soI thought it would be fun to re-create some "classic" CGI scripts. Istarted with a Guestbook (gemini://pboyd.io/guestbook/, source: gemini://pboyd.io/guestbook/guestbook.pl). I got it working, but it felt like I wasin the weeds from the very start.
The first problem I hit is that I'm limited to one input at a time. Iwanted a few inputs (name, location, comment). Of course, plenty of commandline programs work fine with a single argument list, so, in theory, thatshould be enough. But flags or comma-separated input wasn't what I wasgoing for. Successive input prompts didn't seem quite right either.
I ended up with a "form" made out of links to input URLs. The data iscollected in a temp file named with a random session ID, and there's afinal "submit" link that updates the generated guestbook (in true retro CGIfashion it probably fails horribly when two people submit at once).
This works, but like I said, kinda in the weeds. Is there a better way toget multiple inputs that I missed?
The other problem I ran into is that dynamic responses were cached in myclient. In my case, the user would submit the form and be presented with anerror page. They'd fix the error and resubmit only to get the same erroragain because of the client cache.
I worked around that by making sure each generated link is unique (by acounter). Conditional GET behavior is probably too complicated, but itwould be nice if there were a "Pragma: no-cache" type flag on dynamic pages.
Anyway, am I making this harder than it needs to be? Am I just trying to dosomething that shouldn't be done on Gemini?
Cheers,Paul-------------- next part --------------An HTML attachment was scrubbed...URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20200717/c6a609a0/attachment.htm>